This commit is contained in:
parent
7f1c8e2012
commit
3b2b2c2001
14 changed files with 287 additions and 272 deletions
|
@ -68,6 +68,8 @@ gfx_src := prim \
|
||||||
# bilboard
|
# bilboard
|
||||||
|
|
||||||
gui_src := gui \
|
gui_src := gui \
|
||||||
|
gbutton \
|
||||||
|
gframe \
|
||||||
greadout \
|
greadout \
|
||||||
gtextbox
|
gtextbox
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ SpriteBank *CGameScene::s_sprites;
|
||||||
|
|
||||||
BubicleEmitterData bubData=
|
BubicleEmitterData bubData=
|
||||||
{
|
{
|
||||||
206,200,55,45, // m_x,m_y,m_w,m_h
|
206,200,60,60, // m_x,m_y,m_w,m_h
|
||||||
10,1, // m_birthRate,m_birthAmount
|
10,1, // m_birthRate,m_birthAmount
|
||||||
-1, // m_life
|
-1, // m_life
|
||||||
{ // m_bubicleBase
|
{ // m_bubicleBase
|
||||||
|
@ -112,9 +112,9 @@ void CGameScene::think(int _frames)
|
||||||
for(int i=0;i<_frames;i++)
|
for(int i=0;i<_frames;i++)
|
||||||
{
|
{
|
||||||
X+=Dx; Y+=Dy;
|
X+=Dx; Y+=Dy;
|
||||||
if (X<0+64) {X=0+64; Dx=getRndRange(5)+1;}
|
if (X<0+4) {X=0+4; Dx=getRndRange(5)+1;}
|
||||||
if (X>512-64) {X=512-64; Dx=-(getRndRange(5)+1);}
|
if (X>512-64) {X=512-64; Dx=-(getRndRange(5)+1);}
|
||||||
if (Y<0+64) {Y=0+64; Dy=getRndRange(5)+1;}
|
if (Y<+4) {Y=0+4; Dy=getRndRange(5)+1;}
|
||||||
if (Y>256-64) {Y=256-64; Dy=-(getRndRange(5)+1);}
|
if (Y>256-64) {Y=256-64; Dy=-(getRndRange(5)+1);}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|
||||||
gui.cpp
|
gbutton.cpp
|
||||||
|
|
||||||
Author: PKG
|
Author: PKG
|
||||||
Created:
|
Created:
|
||||||
|
@ -45,10 +45,6 @@
|
||||||
Vars
|
Vars
|
||||||
---- */
|
---- */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
@ -57,18 +53,15 @@
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUIGroupFrame::setFlags(GUI_FLAGS _flags)
|
void CGUIGroupFrame::setFlags(GUI_FLAGS _flags)
|
||||||
{
|
{
|
||||||
// int childFlags;
|
CGUIObject *pGUI;
|
||||||
|
|
||||||
// childFlags=_flags&(-1^FLAG_SELECTED); // Don't propogate the SELECTED flag
|
|
||||||
|
|
||||||
CGUIObject::setFlags(_flags);
|
CGUIObject::setFlags(_flags);
|
||||||
if(getChild())getChild()->setFlags(_flags);
|
pGUI=getChild();
|
||||||
// if(getNext())getNext()->setFlags(_flags);
|
while(pGUI)
|
||||||
|
{
|
||||||
// if(_flags&FLAG_SELECTED)
|
pGUI->setFlags(_flags);
|
||||||
// {
|
pGUI=pGUI->getNext();
|
||||||
// selectFrame();
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,62 +73,16 @@ void CGUIGroupFrame::setFlags(GUI_FLAGS _flags)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUIGroupFrame::clearFlags(GUI_FLAGS _flags)
|
void CGUIGroupFrame::clearFlags(GUI_FLAGS _flags)
|
||||||
{
|
{
|
||||||
// int childFlags;
|
CGUIObject *pGUI;
|
||||||
|
|
||||||
// childFlags=_flags&(-1^FLAG_SELECTED); // Don't propogate the SELECTED flag
|
|
||||||
|
|
||||||
CGUIObject::clearFlags(_flags);
|
CGUIObject::clearFlags(_flags);
|
||||||
if(getChild())getChild()->clearFlags(_flags);
|
|
||||||
// if(getNext())getNext()->clearFlags(_flags);
|
|
||||||
|
|
||||||
// if(_flags&FLAG_SELECTED)
|
|
||||||
// {
|
|
||||||
// unselectFrame();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Function:
|
|
||||||
Purpose:
|
|
||||||
Params:
|
|
||||||
Returns:
|
|
||||||
---------------------------------------------------------------------- */
|
|
||||||
/*
|
|
||||||
void CGUIGroupFrame::selectFrame()
|
|
||||||
{
|
|
||||||
CGUIObject *pGUI;
|
|
||||||
|
|
||||||
pGUI=getChild();
|
pGUI=getChild();
|
||||||
if(pGUI)
|
while(pGUI)
|
||||||
{
|
{
|
||||||
pGUI->select();
|
pGUI->clearFlags(_flags);
|
||||||
pGUI=pGUI->getNext();
|
pGUI=pGUI->getNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Function:
|
|
||||||
Purpose:
|
|
||||||
Params:
|
|
||||||
Returns:
|
|
||||||
---------------------------------------------------------------------- */
|
|
||||||
/*
|
|
||||||
void CGUIGroupFrame::unselectFrame()
|
|
||||||
{
|
|
||||||
CGUIObject *pGUI;
|
|
||||||
|
|
||||||
pGUI=getChild();
|
|
||||||
if(pGUI)
|
|
||||||
{
|
|
||||||
pGUI->unselect();
|
|
||||||
pGUI=pGUI->getNext();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,7 +141,6 @@ void CGUIControlFrame::setFlags(GUI_FLAGS _flags)
|
||||||
CGUIObject::setFlags(_flags);
|
CGUIObject::setFlags(_flags);
|
||||||
childFlags=(GUI_FLAGS)(_flags&(-1^FLAG_SELECTED)); // Don't propogate the SELECTED flag
|
childFlags=(GUI_FLAGS)(_flags&(-1^FLAG_SELECTED)); // Don't propogate the SELECTED flag
|
||||||
if(getChild())getChild()->setFlags(childFlags);
|
if(getChild())getChild()->setFlags(childFlags);
|
||||||
// if(getNext())getNext()->setFlags(_flags);
|
|
||||||
|
|
||||||
if(_flags&FLAG_SELECTED)
|
if(_flags&FLAG_SELECTED)
|
||||||
{
|
{
|
||||||
|
@ -216,7 +162,6 @@ void CGUIControlFrame::clearFlags(GUI_FLAGS _flags)
|
||||||
CGUIObject::clearFlags(_flags);
|
CGUIObject::clearFlags(_flags);
|
||||||
childFlags=(GUI_FLAGS)(_flags&(-1^FLAG_SELECTED)); // Don't propogate the SELECTED flag
|
childFlags=(GUI_FLAGS)(_flags&(-1^FLAG_SELECTED)); // Don't propogate the SELECTED flag
|
||||||
if(getChild())getChild()->clearFlags(childFlags);
|
if(getChild())getChild()->clearFlags(childFlags);
|
||||||
// if(getNext())getNext()->clearFlags(_flags);
|
|
||||||
|
|
||||||
if(_flags&FLAG_SELECTED)
|
if(_flags&FLAG_SELECTED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,9 +44,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
GUI_FLAGS getInitialFlags() {return FLAG_DRAWBORDER;}
|
GUI_FLAGS getInitialFlags() {return FLAG_DRAWBORDER;}
|
||||||
|
|
||||||
// void selectFrame();
|
|
||||||
// void unselectFrame();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|
||||||
gui.cpp
|
greadout.cpp
|
||||||
|
|
||||||
Author: PKG
|
Author: PKG
|
||||||
Created:
|
Created:
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
|
||||||
|
@ -56,16 +55,12 @@
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUITextReadout::init(GUIId _id)
|
void CGUITextReadout::init(CGUIObject *_parent,GUIId _id)
|
||||||
{
|
{
|
||||||
CGUIObject::init(_id);
|
CGUIObjectWithFont::init(_parent,_id);
|
||||||
m_target=0;
|
m_target=0;
|
||||||
m_data=0;
|
m_data=0;
|
||||||
m_textId=TranslationDatabase::NO_STRING;
|
m_textId=TranslationDatabase::NO_STRING;
|
||||||
m_fontBank=new ("TextBox-Font") FontBank();
|
|
||||||
m_fontBank->initialise(&standardFont);
|
|
||||||
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
m_fontBank->setOt(CGUIObject::DEFAULT_OT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,7 +104,7 @@ void CGUITextReadout::render()
|
||||||
{
|
{
|
||||||
getFontBank()->print((getW()-(BORDERWIDTH*2))/2,m_textY,m_textId);
|
getFontBank()->print((getW()-(BORDERWIDTH*2))/2,m_textY,m_textId);
|
||||||
}
|
}
|
||||||
CGUIObject::render();
|
CGUIObjectWithFont::render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,7 +116,7 @@ void CGUITextReadout::render()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUITextReadout::think(int _frames)
|
void CGUITextReadout::think(int _frames)
|
||||||
{
|
{
|
||||||
CGUIObject::think(_frames);
|
CGUIObjectWithFont::think(_frames);
|
||||||
if(*m_target!=m_lastValue)
|
if(*m_target!=m_lastValue)
|
||||||
{
|
{
|
||||||
recalc();
|
recalc();
|
||||||
|
@ -137,7 +132,7 @@ void CGUITextReadout::think(int _frames)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUITextReadout::recalc()
|
void CGUITextReadout::recalc()
|
||||||
{
|
{
|
||||||
CGUIObject::recalc();
|
CGUIObjectWithFont::recalc();
|
||||||
|
|
||||||
if(m_data)
|
if(m_data)
|
||||||
{
|
{
|
||||||
|
@ -150,7 +145,6 @@ void CGUITextReadout::recalc()
|
||||||
m_textId=4;
|
m_textId=4;
|
||||||
|
|
||||||
fb=getFontBank();
|
fb=getFontBank();
|
||||||
fb->setPrintArea(getX()+BORDERWIDTH,getY()+BORDERHEIGHT,getW()-(BORDERWIDTH*2),getH()-(BORDERHEIGHT*2));
|
|
||||||
|
|
||||||
m_textId=STR__DUMMY;
|
m_textId=STR__DUMMY;
|
||||||
data=m_data;
|
data=m_data;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
Structure defintions
|
Structure defintions
|
||||||
-------------------- */
|
-------------------- */
|
||||||
|
|
||||||
class CGUITextReadout : public CGUIObject
|
class CGUITextReadout : public CGUIObjectWithFont
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -44,26 +44,23 @@ public:
|
||||||
} TextReadoutData;
|
} TextReadoutData;
|
||||||
|
|
||||||
|
|
||||||
virtual void init(GUIId _id);
|
virtual void init(CGUIObject *_parent,GUIId _id);
|
||||||
|
|
||||||
virtual void setReadoutTarget(int *_target);
|
virtual void setReadoutTarget(int *_target);
|
||||||
virtual void setReadoutData(TextReadoutData *_data);
|
virtual void setReadoutData(TextReadoutData *_data);
|
||||||
|
|
||||||
|
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void think(int _frames);
|
virtual void think(int _frames);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void recalc();
|
void recalc();
|
||||||
class FontBank *getFontBank() {return m_fontBank;}
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int *m_target;
|
int *m_target;
|
||||||
TextReadoutData *m_data;
|
TextReadoutData *m_data;
|
||||||
int m_lastValue;
|
int m_lastValue;
|
||||||
class FontBank *m_fontBank;
|
|
||||||
unsigned int m_textId;
|
unsigned int m_textId;
|
||||||
int m_textY;
|
int m_textY;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|
||||||
gui.cpp
|
gtextbox.cpp
|
||||||
|
|
||||||
Author: PKG
|
Author: PKG
|
||||||
Created:
|
Created:
|
||||||
|
@ -62,28 +62,10 @@
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUITextBox::init(GUIId _id)
|
void CGUITextBox::init(CGUIObject *_parent,GUIId _id)
|
||||||
{
|
{
|
||||||
CGUIObject::init(_id);
|
CGUIObjectWithFont::init(_parent,_id);
|
||||||
m_textId=TranslationDatabase::NO_STRING;
|
m_textId=TranslationDatabase::NO_STRING;
|
||||||
m_fontBank=new ("TextBox-Font") FontBank();
|
|
||||||
m_fontBank->initialise(&standardFont);
|
|
||||||
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
m_fontBank->setOt(CGUIObject::DEFAULT_OT);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Function:
|
|
||||||
Purpose:
|
|
||||||
Params:
|
|
||||||
Returns:
|
|
||||||
---------------------------------------------------------------------- */
|
|
||||||
void CGUITextBox::shutdown()
|
|
||||||
{
|
|
||||||
CGUIObject::shutdown();
|
|
||||||
m_fontBank->dump();
|
|
||||||
m_fontBank=NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +98,7 @@ void CGUITextBox::render()
|
||||||
{
|
{
|
||||||
getFontBank()->print((getW()-(BORDERWIDTH*2))/2,m_textY,m_textId);
|
getFontBank()->print((getW()-(BORDERWIDTH*2))/2,m_textY,m_textId);
|
||||||
}
|
}
|
||||||
CGUIObject::render();
|
CGUIObjectWithFont::render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,9 +113,8 @@ void CGUITextBox::recalc()
|
||||||
FontBank *fb;
|
FontBank *fb;
|
||||||
char *string;
|
char *string;
|
||||||
|
|
||||||
CGUIObject::recalc();
|
CGUIObjectWithFont::recalc();
|
||||||
fb=getFontBank();
|
fb=getFontBank();
|
||||||
fb->setPrintArea(getX()+BORDERWIDTH,getY()+BORDERHEIGHT,getW()-(BORDERWIDTH*2),getH()-(BORDERHEIGHT*2));
|
|
||||||
string=(char*)TranslationDatabase::getString(m_textId);
|
string=(char*)TranslationDatabase::getString(m_textId);
|
||||||
|
|
||||||
#ifdef __VERSION_DEBUG__
|
#ifdef __VERSION_DEBUG__
|
||||||
|
|
|
@ -34,11 +34,10 @@
|
||||||
Structure defintions
|
Structure defintions
|
||||||
-------------------- */
|
-------------------- */
|
||||||
|
|
||||||
class CGUITextBox : public CGUIObject
|
class CGUITextBox : public CGUIObjectWithFont
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void init(GUIId _id);
|
virtual void init(CGUIObject *_parent,GUIId _id);
|
||||||
virtual void shutdown();
|
|
||||||
|
|
||||||
virtual void setText(unsigned int _textId);
|
virtual void setText(unsigned int _textId);
|
||||||
|
|
||||||
|
@ -47,11 +46,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void recalc();
|
void recalc();
|
||||||
class FontBank *getFontBank() {return m_fontBank;}
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class FontBank *m_fontBank;
|
|
||||||
unsigned int m_textId;
|
unsigned int m_textId;
|
||||||
int m_textY;
|
int m_textY;
|
||||||
|
|
||||||
|
|
|
@ -53,17 +53,13 @@
|
||||||
Vars
|
Vars
|
||||||
---- */
|
---- */
|
||||||
|
|
||||||
CGUIObject *CGUIObject::s_llBase=NULL;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUIObject::init(GUIId _id)
|
void CGUIObject::init(CGUIObject *_parent,GUIId _id)
|
||||||
{
|
{
|
||||||
ASSERT(this!=m_this);
|
ASSERT(this!=m_this);
|
||||||
|
|
||||||
|
@ -71,25 +67,36 @@ void CGUIObject::init(GUIId _id)
|
||||||
m_x=m_y=m_w=m_h=0;
|
m_x=m_y=m_w=m_h=0;
|
||||||
m_flags=getInitialFlags();
|
m_flags=getInitialFlags();
|
||||||
m_this=this;
|
m_this=this;
|
||||||
|
m_parent=_parent;
|
||||||
|
m_child=NULL;
|
||||||
|
m_next=NULL;
|
||||||
|
|
||||||
// Add to the end of the linked list of GUI objects..
|
// Link in with the parent
|
||||||
// Also check for duplicate IDs
|
if(m_parent)
|
||||||
if(s_llBase)
|
{
|
||||||
|
if(m_parent->m_child)
|
||||||
{
|
{
|
||||||
CGUIObject *pGUI;
|
CGUIObject *pGUI;
|
||||||
pGUI=s_llBase;
|
pGUI=m_parent->m_child;
|
||||||
while(pGUI->m_llNext)
|
while(pGUI->m_next)
|
||||||
{
|
{
|
||||||
ASSERT(pGUI->m_id==_id);
|
pGUI=pGUI->m_next;
|
||||||
pGUI=pGUI->m_llNext;
|
|
||||||
}
|
}
|
||||||
pGUI->m_llNext=this;
|
pGUI->m_next=this;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s_llBase=this;
|
m_parent->m_child=this;
|
||||||
|
}
|
||||||
|
setOt(m_parent->getOt()-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// PKG - Need to add some code to check that only one bastard ( that is, parentless :) object
|
||||||
|
// is ever in existance.
|
||||||
|
GUI_DBGMSG("INFO: GUI object without parent created!");
|
||||||
|
setOt(INITIAL_OT);
|
||||||
}
|
}
|
||||||
m_llNext=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,20 +108,14 @@ void CGUIObject::init(GUIId _id)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CGUIObject::shutdown()
|
void CGUIObject::shutdown()
|
||||||
{
|
{
|
||||||
CGUIObject *pGUI;
|
|
||||||
|
|
||||||
ASSERT(this==m_this);
|
ASSERT(this==m_this);
|
||||||
|
|
||||||
m_this=0;
|
if(m_child)m_child->shutdown(); m_child=NULL;
|
||||||
|
if(m_next)m_next->shutdown(); m_next=NULL;
|
||||||
|
m_parent=NULL;
|
||||||
|
|
||||||
// Remove from linked list of GUI objects..
|
// Is this actually safe? Not really.. (PKG)
|
||||||
pGUI=s_llBase;
|
delete this;
|
||||||
while(pGUI->m_llNext!=this);
|
|
||||||
{
|
|
||||||
ASSERT(pGUI); // Huh? Couldn't find this item in the list!?!?!
|
|
||||||
pGUI=pGUI->m_llNext;
|
|
||||||
}
|
|
||||||
pGUI->m_llNext=this->m_llNext;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,41 +124,61 @@ void CGUIObject::shutdown()
|
||||||
Purpose: NB: The chain of render functions needs to be reversed so
|
Purpose: NB: The chain of render functions needs to be reversed so
|
||||||
that the draworder is correct! Look at any subclasses
|
that the draworder is correct! Look at any subclasses
|
||||||
render() function to see what I mean by this.. (PKG)
|
render() function to see what I mean by this.. (PKG)
|
||||||
|
um.. or does it?
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
#ifdef __USER_paul__
|
||||||
|
int forceBorderDraw=true;
|
||||||
|
#endif
|
||||||
void CGUIObject::render()
|
void CGUIObject::render()
|
||||||
{
|
{
|
||||||
ASSERT(this==m_this);
|
ASSERT(this==m_this);
|
||||||
|
|
||||||
|
if(m_child)m_child->render();
|
||||||
|
if(m_next)m_next->render();
|
||||||
|
|
||||||
if(isHidden())
|
if(isHidden())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __USER_paul__
|
||||||
|
if(getFlags(FLAG_DRAWBORDER)||forceBorderDraw)
|
||||||
|
#else
|
||||||
if(getFlags(FLAG_DRAWBORDER))
|
if(getFlags(FLAG_DRAWBORDER))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
POLY_G4 *g4;
|
POLY_G4 *g4;
|
||||||
int x,y,w,h;
|
int x,y,w,h;
|
||||||
int r,g,b;
|
int r,g,b;
|
||||||
|
int ot;
|
||||||
|
|
||||||
x=getX();
|
x=getX()+getParentX();
|
||||||
y=getY();
|
y=getY()+getParentY();
|
||||||
w=getW();
|
w=getW();
|
||||||
h=getH();
|
h=getH();
|
||||||
r=g=b=240;
|
if(isSelected())
|
||||||
|
{
|
||||||
|
r=g=b=225;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
r=g=b=150;
|
||||||
|
}
|
||||||
|
ot=getOt();
|
||||||
|
|
||||||
// Border
|
// Border
|
||||||
DrawLine(x ,y ,x+w,y ,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y ,x+w,y ,r,g,b,ot);
|
||||||
DrawLine(x ,y ,x ,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y ,x ,y+h,r,g,b,ot);
|
||||||
DrawLine(x+w,y ,x+w,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x+w,y ,x+w,y+h,r,g,b,ot);
|
||||||
DrawLine(x ,y+h,x+w,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y+h,x+w,y+h,r,g,b,ot);
|
||||||
|
|
||||||
x+=3;y+=2;w-=6;h-=4;
|
x+=3;y+=2;w-=6;h-=4;
|
||||||
DrawLine(x ,y ,x+w,y ,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y ,x+w,y ,r,g,b,ot);
|
||||||
DrawLine(x ,y ,x ,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y ,x ,y+h,r,g,b,ot);
|
||||||
DrawLine(x+w,y ,x+w,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x+w,y ,x+w,y+h,r,g,b,ot);
|
||||||
DrawLine(x ,y+h,x+w,y+h,r,g,b,DEFAULT_OT);
|
DrawLine(x ,y+h,x+w,y+h,r,g,b,ot);
|
||||||
x-=3;y-=2;w+=6;h+=4;
|
x-=3;y-=2;w+=6;h+=4;
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
|
@ -168,7 +189,7 @@ void CGUIObject::render()
|
||||||
setRGB1(g4,250,125, 15);
|
setRGB1(g4,250,125, 15);
|
||||||
setRGB2(g4, 15,250,125);
|
setRGB2(g4, 15,250,125);
|
||||||
setRGB3(g4, 15,125,250);
|
setRGB3(g4, 15,125,250);
|
||||||
AddPrimToList(g4,DEFAULT_OT);
|
AddPrimToList(g4,ot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,9 +200,21 @@ void CGUIObject::render()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
#include "utils\utils.h"
|
||||||
|
int wob=0;
|
||||||
void CGUIObject::think(int _frames)
|
void CGUIObject::think(int _frames)
|
||||||
{
|
{
|
||||||
ASSERT(this==m_this);
|
ASSERT(this==m_this);
|
||||||
|
|
||||||
|
|
||||||
|
if(m_id==0&&++wob==20)
|
||||||
|
{
|
||||||
|
setObjectXYWH(16+getRndRange(10),100+getRndRange(5),512-64,120);
|
||||||
|
wob=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_child)m_child->think(_frames);
|
||||||
|
if(m_next)m_next->think(_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,20 +227,32 @@ void CGUIObject::think(int _frames)
|
||||||
void CGUIObject::recalc()
|
void CGUIObject::recalc()
|
||||||
{
|
{
|
||||||
ASSERT(this==m_this);
|
ASSERT(this==m_this);
|
||||||
|
|
||||||
|
if(m_child)m_child->recalc();
|
||||||
|
if(m_next)m_next->recalc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
extern void guiOpen()
|
void CGUIObjectWithFont::init(CGUIObject *_parent,GUIId _id)
|
||||||
{
|
{
|
||||||
ASSERT(!CGUIObject::s_llBase);
|
CGUIObject::init(_parent,_id);
|
||||||
|
m_fontBank=new ("GUIObjectWithFont:fontBank") FontBank();
|
||||||
|
m_fontBank->initialise(&standardFont);
|
||||||
|
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
|
m_fontBank->setOt(getOt());
|
||||||
|
m_fontBank->setColour(DEFAULT_FONT_R,DEFAULT_FONT_G,DEFAULT_FONT_B);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,14 +262,27 @@ extern void guiOpen()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
extern void guiClose()
|
void CGUIObjectWithFont::shutdown()
|
||||||
{
|
{
|
||||||
// Dump everything automatically
|
CGUIObject::shutdown();
|
||||||
// Don't walk the linked list here but keep removing the head since frame
|
m_fontBank->dump();
|
||||||
// objects remove their own children (PKG or do they?)
|
delete(m_fontBank);
|
||||||
while(CGUIObject::s_llBase)
|
m_fontBank=NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CGUIObjectWithFont::setFlags(GUI_FLAGS _flags)
|
||||||
|
{
|
||||||
|
CGUIObject::setFlags(_flags);
|
||||||
|
if(_flags&FLAG_SELECTED)
|
||||||
{
|
{
|
||||||
CGUIObject::s_llBase->shutdown();
|
getFontBank()->setColour(CGUIObjectWithFont::SELECTED_FONT_R,CGUIObjectWithFont::SELECTED_FONT_G,CGUIObjectWithFont::SELECTED_FONT_B);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,58 +293,34 @@ extern void guiClose()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
extern void guiThink(int _frames)
|
void CGUIObjectWithFont::clearFlags(GUI_FLAGS _flags)
|
||||||
{
|
{
|
||||||
CGUIObject *pGUI;
|
CGUIObject::clearFlags(_flags);
|
||||||
pGUI=CGUIObject::s_llBase;
|
if(_flags&FLAG_SELECTED)
|
||||||
while(pGUI)
|
|
||||||
{
|
{
|
||||||
pGUI->think(_frames);
|
getFontBank()->setColour(CGUIObjectWithFont::DEFAULT_FONT_R,CGUIObjectWithFont::DEFAULT_FONT_G,CGUIObjectWithFont::DEFAULT_FONT_B);
|
||||||
pGUI=pGUI->m_llNext;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
extern void guiRender()
|
void CGUIObjectWithFont::recalc()
|
||||||
{
|
{
|
||||||
CGUIObject *pGUI;
|
int x,y,w,h;
|
||||||
pGUI=CGUIObject::s_llBase;
|
|
||||||
while(pGUI)
|
|
||||||
{
|
|
||||||
pGUI->render();
|
|
||||||
pGUI=pGUI->m_llNext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
CGUIObject::recalc();
|
||||||
|
x=getX()+getParentX()+BORDERWIDTH;
|
||||||
|
y=getY()+getParentY()+BORDERHEIGHT;
|
||||||
|
w=getW()-(BORDERWIDTH*2);
|
||||||
|
h=getH()-(BORDERHEIGHT*2);
|
||||||
|
getFontBank()->setPrintArea(x,y,w,h);
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Function:
|
|
||||||
Purpose:
|
|
||||||
Params:
|
|
||||||
Returns:
|
|
||||||
---------------------------------------------------------------------- */
|
|
||||||
extern CGUIObject *guiGetItem(CGUIObject::GUIId _searchId)
|
|
||||||
{
|
|
||||||
CGUIObject *pGUI;
|
|
||||||
pGUI=CGUIObject::s_llBase;
|
|
||||||
while(pGUI)
|
|
||||||
{
|
|
||||||
if(pGUI->m_id==_searchId)
|
|
||||||
{
|
|
||||||
return pGUI;
|
|
||||||
}
|
|
||||||
pGUI=pGUI->m_llNext;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bwah!
|
|
||||||
ASSERT(0);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
FLAG_NONE= 0,
|
||||||
FLAG_SELECTED= 1<<0,
|
FLAG_SELECTED= 1<<0,
|
||||||
FLAG_HIDDEN= 1<<2,
|
FLAG_HIDDEN= 1<<2,
|
||||||
FLAG_DRAWBORDER= 1<<3,
|
FLAG_DRAWBORDER= 1<<3,
|
||||||
|
@ -43,13 +44,13 @@ public:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DEFAULT_OT=20,
|
INITIAL_OT=200,
|
||||||
BORDERWIDTH=8,
|
BORDERWIDTH=8,
|
||||||
BORDERHEIGHT=5,
|
BORDERHEIGHT=5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
virtual void init(GUIId _id);
|
virtual void init(CGUIObject *_parent,GUIId _id);
|
||||||
virtual void shutdown();
|
virtual void shutdown();
|
||||||
|
|
||||||
void setObjectX(int _x) {m_x=_x;recalc();}
|
void setObjectX(int _x) {m_x=_x;recalc();}
|
||||||
|
@ -62,10 +63,9 @@ public:
|
||||||
|
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void think(int _frames);
|
virtual void think(int _frames);
|
||||||
virtual void recalc();
|
|
||||||
|
|
||||||
void setFlags(GUI_FLAGS _flags) {m_flags|=_flags;}
|
virtual void setFlags(GUI_FLAGS _flags) {m_flags|=_flags;}
|
||||||
void clearFlags(GUI_FLAGS _flags) {m_flags&=_flags^-1;}
|
virtual void clearFlags(GUI_FLAGS _flags) {m_flags&=_flags^-1;}
|
||||||
int getFlags(GUI_FLAGS _flags) {return (m_flags&_flags)!=0;}
|
int getFlags(GUI_FLAGS _flags) {return (m_flags&_flags)!=0;}
|
||||||
|
|
||||||
// Quick access functions to the most frequently used flags
|
// Quick access functions to the most frequently used flags
|
||||||
|
@ -76,9 +76,15 @@ public:
|
||||||
void unhide() {clearFlags(FLAG_HIDDEN);}
|
void unhide() {clearFlags(FLAG_HIDDEN);}
|
||||||
int isHidden() {return getFlags(FLAG_HIDDEN);}
|
int isHidden() {return getFlags(FLAG_HIDDEN);}
|
||||||
|
|
||||||
|
CGUIObject *getChild() {return m_child;}
|
||||||
|
CGUIObject *getNext() {return m_next;}
|
||||||
|
|
||||||
|
int getId() {return m_id;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual GUI_FLAGS getInitialFlags() {return FLAG_DRAWBORDER;}
|
virtual void recalc();
|
||||||
|
|
||||||
|
virtual GUI_FLAGS getInitialFlags() {return FLAG_NONE;}
|
||||||
virtual int isSelectable() {return false;}
|
virtual int isSelectable() {return false;}
|
||||||
|
|
||||||
int getX() {return m_x;}
|
int getX() {return m_x;}
|
||||||
|
@ -86,28 +92,57 @@ protected:
|
||||||
int getW() {return m_w;}
|
int getW() {return m_w;}
|
||||||
int getH() {return m_h;}
|
int getH() {return m_h;}
|
||||||
|
|
||||||
|
int getParentX() {if(m_parent)return m_parent->getX()+m_parent->getParentX();else return 0;}
|
||||||
|
int getParentY() {if(m_parent)return m_parent->getY()+m_parent->getParentY();else return 0;}
|
||||||
|
|
||||||
|
void setOt(int _ot) {m_ot=_ot;}
|
||||||
|
int getOt() {return m_ot;}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GUIId m_id;
|
GUIId m_id;
|
||||||
int m_x,m_y,m_w,m_h;
|
int m_x,m_y,m_w,m_h;
|
||||||
int m_flags;
|
int m_flags;
|
||||||
|
int m_ot;
|
||||||
|
|
||||||
CGUIObject *m_this;
|
CGUIObject *m_this; // Used to check that that the object has been initialised
|
||||||
CGUIObject *m_llNext;
|
CGUIObject *m_parent; // Parent object
|
||||||
static CGUIObject *s_llBase;
|
CGUIObject *m_child; // First child
|
||||||
|
CGUIObject *m_next; // Next item at this level
|
||||||
|
|
||||||
// ..don't like using friends for this :(
|
|
||||||
friend void guiOpen();
|
|
||||||
friend void guiClose();
|
|
||||||
friend void guiThink(int _frames);
|
|
||||||
friend void guiRender();
|
|
||||||
friend CGUIObject *guiGetItem(CGUIObject::GUIId _searchId);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class CGUIObjectWithFont : public CGUIObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void init(CGUIObject *_parent,GUIId _id);
|
||||||
|
virtual void shutdown();
|
||||||
|
|
||||||
|
virtual void setFlags(GUI_FLAGS _flags);
|
||||||
|
virtual void clearFlags(GUI_FLAGS _flags);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DEFAULT_FONT_R=150,
|
||||||
|
DEFAULT_FONT_G=100,
|
||||||
|
DEFAULT_FONT_B=100,
|
||||||
|
SELECTED_FONT_R=175,
|
||||||
|
SELECTED_FONT_G=225,
|
||||||
|
SELECTED_FONT_B=175,
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual void recalc();
|
||||||
|
|
||||||
|
class FontBank *getFontBank() {return m_fontBank;}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
class FontBank *m_fontBank;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -118,12 +153,6 @@ private:
|
||||||
Functions
|
Functions
|
||||||
--------- */
|
--------- */
|
||||||
|
|
||||||
extern void guiOpen();
|
|
||||||
extern void guiClose();
|
|
||||||
extern void guiThink(int _frames);
|
|
||||||
extern void guiRender();
|
|
||||||
extern CGUIObject *guiGetItem(CGUIObject::GUIId _searchId);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------- */
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
#endif /* __GUI_GUI_H__ */
|
#endif /* __GUI_GUI_H__ */
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
#ifndef __PAD_PADS_H__
|
#ifndef __PAD_PADS_H__
|
||||||
#define __PAD_PADS_H__
|
#define __PAD_PADS_H__
|
||||||
|
|
||||||
|
#ifndef _GLOBAL_HEADER_
|
||||||
|
#include "system\global.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
#define DUALSHOCKMODE ((u_long *)0x80010000)
|
#define DUALSHOCKMODE ((u_long *)0x80010000)
|
||||||
|
|
||||||
|
@ -40,8 +45,8 @@
|
||||||
#define BUTTON_SELECT PAD_CROSS
|
#define BUTTON_SELECT PAD_CROSS
|
||||||
#define BUTTON_BACK PAD_TRIANGLE
|
#define BUTTON_BACK PAD_TRIANGLE
|
||||||
|
|
||||||
#define TYPOMATIC_DELAY 75
|
#define TYPOMATIC_DELAY 60
|
||||||
#define TYPOMATIC_RATE 50
|
#define TYPOMATIC_RATE 30
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -54,10 +54,18 @@
|
||||||
#include "gui\gtextbox.h"
|
#include "gui\gtextbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GFRAME_H__
|
||||||
|
#include "gui\gframe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GUI_GREADOUT_H__
|
#ifndef __GUI_GREADOUT_H__
|
||||||
#include "gui\greadout.h"
|
#include "gui\greadout.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GBUTTON_H__
|
||||||
|
#include "gui\gbutton.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __LOCALE_TEXTDBASE_H__
|
#ifndef __LOCALE_TEXTDBASE_H__
|
||||||
#include "locale\textdbase.h"
|
#include "locale\textdbase.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,33 +105,65 @@ unsigned int str=STR__PAULS_TEST_STRING_1;
|
||||||
int w=150;
|
int w=150;
|
||||||
int h=40;
|
int h=40;
|
||||||
|
|
||||||
int testValue=1;
|
int testValue=0;
|
||||||
CGUITextReadout::TextReadoutData testData[]=
|
CGUITextReadout::TextReadoutData testReadoutData[]=
|
||||||
{
|
{
|
||||||
{ 1, STR__PAULS_TEST_STRING_1, },
|
{ 1, STR__PAULS_TEST_STRING_1, },
|
||||||
{ 2, STR__PAULS_TEST_STRING_2, },
|
{ 2, STR__PAULS_TEST_STRING_2, },
|
||||||
{ 3, STR__PAULS_TEST_STRING_3, },
|
{ 3, STR__PAULS_TEST_STRING_3, },
|
||||||
{ 0, 0, },
|
{ 0, 0, },
|
||||||
};
|
};
|
||||||
|
int testButtonData[]=
|
||||||
|
{
|
||||||
|
1,2,3,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
CGUIControlFrame *baseGUIObject;
|
||||||
|
|
||||||
|
|
||||||
void CPaulScene::init()
|
void CPaulScene::init()
|
||||||
{
|
{
|
||||||
s_fontBank.initialise(&standardFont);
|
|
||||||
guiOpen();
|
|
||||||
|
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
tb=new ("textbox") CGUITextBox();
|
|
||||||
tb->init(1);
|
|
||||||
tb->setObjectXY(200,130);
|
|
||||||
|
|
||||||
CGUITextReadout *tr;
|
CGUITextReadout *tr;
|
||||||
|
CGUIGroupFrame *fr;
|
||||||
|
CGUIButton *bu;
|
||||||
|
|
||||||
|
s_fontBank.initialise(&standardFont);
|
||||||
|
|
||||||
|
baseGUIObject=new ("Uber GUI object") CGUIControlFrame();
|
||||||
|
baseGUIObject->init(NULL,0);
|
||||||
|
baseGUIObject->setObjectXYWH(32,100,512-64,120);
|
||||||
|
|
||||||
|
tb=new ("textbox") CGUITextBox();
|
||||||
|
tb->init(baseGUIObject,1);
|
||||||
|
tb->setObjectXYWH(10,10,400,25);
|
||||||
|
tb->setText(STR__PAULS_TEST_STRING_1);
|
||||||
|
|
||||||
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
|
fr->init(baseGUIObject,2);
|
||||||
|
fr->setObjectXYWH(10,40,400,25);
|
||||||
|
tb=new ("textbox") CGUITextBox();
|
||||||
|
tb->init(fr,20);
|
||||||
|
tb->setObjectXYWH(50,1,300,22);
|
||||||
|
tb->setText(STR__PAULS_TEST_STRING_1);
|
||||||
|
bu=new ("button") CGUIButton();
|
||||||
|
bu->init(fr,21);
|
||||||
|
bu->setObjectXYWH(50,1,10,10);
|
||||||
|
bu->setButtonTarget(&testValue);
|
||||||
|
bu->setButtonData(testButtonData);
|
||||||
|
|
||||||
tr=new ("textreadout") CGUITextReadout();
|
tr=new ("textreadout") CGUITextReadout();
|
||||||
tr->init(2);
|
tr->init(baseGUIObject,3);
|
||||||
tr->setObjectXYWH(40,130,120,80);
|
tr->setObjectXYWH(10,70,400,25);
|
||||||
tr->setReadoutTarget(&testValue);
|
tr->setReadoutTarget(&testValue);
|
||||||
tr->setReadoutData(testData);
|
tr->setReadoutData(testReadoutData);
|
||||||
|
|
||||||
|
// Heh.. this'll actually work =)
|
||||||
|
// baseGUIObject->shutdown();
|
||||||
|
|
||||||
|
|
||||||
|
baseGUIObject->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,7 +176,6 @@ void CPaulScene::init()
|
||||||
void CPaulScene::shutdown()
|
void CPaulScene::shutdown()
|
||||||
{
|
{
|
||||||
s_fontBank.dump();
|
s_fontBank.dump();
|
||||||
guiClose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +199,7 @@ void CPaulScene::render()
|
||||||
y+=charHeight;
|
y+=charHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
guiRender();
|
baseGUIObject->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,12 +211,14 @@ void CPaulScene::render()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CPaulScene::think(int _frames)
|
void CPaulScene::think(int _frames)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
CGUITextBox *tb;
|
CGUITextBox *tb;
|
||||||
tb=(CGUITextBox *)guiGetItem(1);
|
tb=(CGUITextBox *)guiGetItem(1);
|
||||||
tb->setObjectWH(w,h);
|
tb->setObjectWH(w,h);
|
||||||
tb->setText(str);
|
tb->setText(str);
|
||||||
|
*/
|
||||||
|
|
||||||
guiThink(GameState::getFramesSinceLast());
|
baseGUIObject->think(_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,27 +21,6 @@
|
||||||
#include "utils\replace.h"
|
#include "utils\replace.h"
|
||||||
#include <gtemac.h>
|
#include <gtemac.h>
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
typedef signed char s8;
|
|
||||||
typedef signed short s16;
|
|
||||||
typedef signed long s32;
|
|
||||||
typedef long long s64;
|
|
||||||
|
|
||||||
typedef unsigned char u8;
|
|
||||||
typedef unsigned short u16;
|
|
||||||
typedef unsigned long u32;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
|
|
||||||
typedef s8 S8;
|
|
||||||
typedef s16 S16;
|
|
||||||
typedef s32 S32;
|
|
||||||
typedef s64 S64;
|
|
||||||
|
|
||||||
typedef u8 U8;
|
|
||||||
typedef u16 U16;
|
|
||||||
typedef u32 U32;
|
|
||||||
typedef u64 U64;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
#define SCRATCH_RAM 0x1f800000
|
#define SCRATCH_RAM 0x1f800000
|
||||||
#define FAST_STACK (SCRATCH_RAM+0x3f0)
|
#define FAST_STACK (SCRATCH_RAM+0x3f0)
|
||||||
|
@ -62,6 +41,8 @@ enum DRAW_TYPE
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
#include "system\types.h"
|
||||||
|
|
||||||
#include "mem\memory.h"
|
#include "mem\memory.h"
|
||||||
#include "system\gte.h"
|
#include "system\gte.h"
|
||||||
#include "utils\cmxmacro.h"
|
#include "utils\cmxmacro.h"
|
||||||
|
|
|
@ -357,6 +357,10 @@ SOURCE=..\..\..\source\system\main.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\system\types.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\system\vid.cpp
|
SOURCE=..\..\..\source\system\vid.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -437,6 +441,14 @@ SOURCE=..\..\..\source\utils\utils.h
|
||||||
# PROP Default_Filter ""
|
# PROP Default_Filter ""
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\gui\gframe.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\gui\gframe.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\gui\greadout.cpp
|
SOURCE=..\..\..\source\gui\greadout.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue