This commit is contained in:
Paul 2001-06-26 19:18:56 +00:00
parent 0dc072d6ad
commit 13cca1815f
5 changed files with 9 additions and 34 deletions

View File

@ -160,7 +160,7 @@ void CFrontEndStart::init()
m_font=new ("ChooseSlotFont") FontBank(); m_font=new ("ChooseSlotFont") FontBank();
m_font->initialise(&standardFont); m_font->initialise(&standardFont);
m_font->setJustification(FontBank::JUST_LEFT); m_font->setJustification(FontBank::JUST_LEFT);
m_font->setOt(3); m_font->setOt(0);
m_font->setPrintArea(0,0,712,256); m_font->setPrintArea(0,0,712,256);
m_spriteBank=new ("PartItemSprites") SpriteBank(); m_spriteBank=new ("PartItemSprites") SpriteBank();
@ -237,11 +237,11 @@ void CFrontEndStart::render()
switch(m_state) switch(m_state)
{ {
case STATE_SELECT: case STATE_SELECT:
m_emptyGuiFrame->render();
if(!m_slotDrawOffset) if(!m_slotDrawOffset)
{ {
drawInstructions(); drawInstructions();
} }
m_emptyGuiFrame->render();
break; break;
case STATE_CONFIRM_ERASE: case STATE_CONFIRM_ERASE:

View File

@ -77,7 +77,6 @@ static const int FRAME_WIDTH =352;
static const int FRAME_HEIGHT =160; static const int FRAME_HEIGHT =160;
static const int TEXT_BOX_WIDTH =300; static const int TEXT_BOX_WIDTH =300;
static const int TEXT_BOX_HEIGHT =20; static const int TEXT_BOX_HEIGHT =20;
static const int OT_POS =5;
static const int TEXT_SPACING =13; static const int TEXT_SPACING =13;
extern int newmode; extern int newmode;
@ -90,7 +89,6 @@ void CPauseMenu::init()
m_guiFrame=new ("Conversation GUI") CGUIControlFrame(); m_guiFrame=new ("Conversation GUI") CGUIControlFrame();
m_guiFrame->init(0); m_guiFrame->init(0);
m_guiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT); m_guiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
m_guiFrame->setOt(OT_POS);
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER); m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
int xpos=TEXT_SPACING/2; int xpos=TEXT_SPACING/2;

View File

@ -96,12 +96,10 @@ void CGUIObject::init(CGUIObject *_parent,GUIId _id)
{ {
m_parent->m_child=this; m_parent->m_child=this;
} }
setOt(m_parent->getOt()-1);
} }
else else
{ {
// This object is a bastard :) // This object is a bastard :)
setOt(INITIAL_OT);
} }
} }
@ -309,19 +307,6 @@ void CGUIObjectWithFont::clearFlags(GUI_FLAGS _flags)
} }
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CGUIObjectWithFont::setOt(int _ot)
{
CGUIObject::setOt(_ot);
getFontBank()->setOt(_ot);
}
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
Function: Function:
Purpose: Purpose:
@ -418,7 +403,6 @@ void initGUIStuff()
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot) void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot)
{ {
_ot=0; // Sorry again
sFrameHdr *vbam,*hbam,*corner; sFrameHdr *vbam,*hbam,*corner;
int totalSize,numSprites,step; int totalSize,numSprites,step;
int x1,y1,x2,y2; int x1,y1,x2,y2;

View File

@ -93,8 +93,7 @@ public:
virtual int isSelectable() {return false;} virtual int isSelectable() {return false;}
virtual int isUnselectable() {return true;} virtual int isUnselectable() {return true;}
void setOt(int _ot) {m_ot=_ot;} int getOt() {return 0;}
int getOt() {return m_ot;}
// PKG - Do we really need ids!? // PKG - Do we really need ids!?
int getId() {return m_id;} int getId() {return m_id;}
@ -136,8 +135,6 @@ public:
virtual void setFlags(GUI_FLAGS _flags); virtual void setFlags(GUI_FLAGS _flags);
virtual void clearFlags(GUI_FLAGS _flags); virtual void clearFlags(GUI_FLAGS _flags);
void setOt(int _ot);
protected: protected:
enum enum

View File

@ -157,7 +157,6 @@ void CShopScene::init()
m_font=new ("shop font") ScalableFontBank(); m_font=new ("shop font") ScalableFontBank();
m_font->initialise(&standardFont); m_font->initialise(&standardFont);
m_font->setJustification(ScalableFontBank::JUST_CENTRE); m_font->setJustification(ScalableFontBank::JUST_CENTRE);
m_font->setOt(5);
m_spriteBank=new ("shop sprites") SpriteBank(); m_spriteBank=new ("shop sprites") SpriteBank();
m_spriteBank->load(SHOP_SHOP_SPR); m_spriteBank->load(SHOP_SHOP_SPR);
@ -166,13 +165,11 @@ void CShopScene::init()
// GUI Frame // GUI Frame
m_guiFrame=new ("Token count frame") CGUIGroupFrame(); m_guiFrame=new ("Token count frame") CGUIGroupFrame();
m_guiFrame->init(0); m_guiFrame->init(0);
m_guiFrame->setOt(5);
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER); m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
m_guiFrame->setObjectXYWH(SHOP_MAIN_UI_X,SHOP_MAIN_UI_Y,SHOP_MAIN_UI_W,SHOP_MAIN_UI_H); m_guiFrame->setObjectXYWH(SHOP_MAIN_UI_X,SHOP_MAIN_UI_Y,SHOP_MAIN_UI_W,SHOP_MAIN_UI_H);
m_guiConfirmPurchaseFrame=new ("Confirm purchase frame") CGUIControlFrame(); m_guiConfirmPurchaseFrame=new ("Confirm purchase frame") CGUIControlFrame();
m_guiConfirmPurchaseFrame->init(0); m_guiConfirmPurchaseFrame->init(0);
m_guiConfirmPurchaseFrame->setOt(4);
m_guiConfirmPurchaseFrame->setFlags(CGUIObject::FLAG_DRAWBORDER); m_guiConfirmPurchaseFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
m_guiConfirmPurchaseFrame->setObjectXYWH(SHOP_QUERY_UI_X,SHOP_QUERY_UI_Y,SHOP_QUERY_UI_W,SHOP_QUERY_UI_H); m_guiConfirmPurchaseFrame->setObjectXYWH(SHOP_QUERY_UI_X,SHOP_QUERY_UI_Y,SHOP_QUERY_UI_W,SHOP_QUERY_UI_H);
CGUIFactory::createValueButtonFrame(m_guiConfirmPurchaseFrame, CGUIFactory::createValueButtonFrame(m_guiConfirmPurchaseFrame,
@ -188,7 +185,6 @@ void CShopScene::init()
m_guiCannotAffordFrame=new ("Cannot afford frame") CGUIControlFrame(); m_guiCannotAffordFrame=new ("Cannot afford frame") CGUIControlFrame();
m_guiCannotAffordFrame->init(0); m_guiCannotAffordFrame->init(0);
m_guiCannotAffordFrame->setOt(4);
m_guiCannotAffordFrame->setFlags(CGUIObject::FLAG_DRAWBORDER); m_guiCannotAffordFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
m_guiCannotAffordFrame->setObjectXYWH(SHOP_QUERY_UI_X,SHOP_QUERY_UI_Y,SHOP_QUERY_UI_W,SHOP_QUERY_UI_H); m_guiCannotAffordFrame->setObjectXYWH(SHOP_QUERY_UI_X,SHOP_QUERY_UI_Y,SHOP_QUERY_UI_W,SHOP_QUERY_UI_H);
CGUIFactory::createValueButtonFrame(m_guiCannotAffordFrame, CGUIFactory::createValueButtonFrame(m_guiCannotAffordFrame,
@ -562,9 +558,9 @@ void CShopScene::renderUi()
fh2=sb->getFrameHeader(FRM__BUTR); fh2=sb->getFrameHeader(FRM__BUTR);
x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W; x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W;
y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT; y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT;
sb->printFT4(fh2,x,y,0,0,5); sb->printFT4(fh2,x,y,0,0,0);
x-=SHOP_GAP_BETWEEN_INSTRUCTION_BUTTONS+fh1->W; x-=SHOP_GAP_BETWEEN_INSTRUCTION_BUTTONS+fh1->W;
sb->printFT4(fh1,x,y,0,0,5); sb->printFT4(fh1,x,y,0,0,0);
maxInstructionsWidth=xbase+SHOP_MAIN_UI_Y-x; maxInstructionsWidth=xbase+SHOP_MAIN_UI_Y-x;
x=xbase+instructionsXBase; x=xbase+instructionsXBase;
@ -573,7 +569,7 @@ void CShopScene::renderUi()
fh1=sb->getFrameHeader(FRM__BUTX); fh1=sb->getFrameHeader(FRM__BUTX);
x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W; x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W;
y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT; y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT;
sb->printFT4(fh1,x-1,y,0,0,5); sb->printFT4(fh1,x-1,y,0,0,0);
x=xbase+instructionsXBase; x=xbase+instructionsXBase;
y=ybase+SHOP_INSTRUCTIONS_Y_BASE+(SHOP_Y_GAP_BETWEEN_INSTRUCTION_LINES*2); y=ybase+SHOP_INSTRUCTIONS_Y_BASE+(SHOP_Y_GAP_BETWEEN_INSTRUCTION_LINES*2);
@ -581,7 +577,7 @@ void CShopScene::renderUi()
fh1=sb->getFrameHeader(FRM__BUTT); fh1=sb->getFrameHeader(FRM__BUTT);
x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W; x-=SHOP_SPACE_BETWEEN_INSTRUCTIONS_AND_BUTTONS+fh2->W;
y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT; y+=SHOP_Y_BUTTON_OFFSET_FORM_TOP_OF_TEXT;
sb->printFT4(fh1,x-1,y,0,0,5); sb->printFT4(fh1,x-1,y,0,0,0);
// Item price // Item price
int x1,x2; int x1,x2;
@ -595,7 +591,7 @@ void CShopScene::renderUi()
fh1=m_spriteBank->getFrameHeader(shopItem->m_frame); fh1=m_spriteBank->getFrameHeader(shopItem->m_frame);
x=xbase+SHOP_ITEM_X_POS; x=xbase+SHOP_ITEM_X_POS;
y=ybase+SHOP_ITEM_Y_POS; y=ybase+SHOP_ITEM_Y_POS;
sb->printFT4(fh1,x,y,0,0,5); sb->printFT4(fh1,x,y,0,0,0);
x1+=32; x1+=32;
@ -616,7 +612,7 @@ void CShopScene::renderUi()
x=xbase+SHOP_TOKEN_COUNT_X_POS; x=xbase+SHOP_TOKEN_COUNT_X_POS;
y=ybase+SHOP_TOKEN_COUNT_Y_POS; y=ybase+SHOP_TOKEN_COUNT_Y_POS;
fh1=m_spriteBank->getFrameHeader(FRM_SMALLTOKEN); fh1=m_spriteBank->getFrameHeader(FRM_SMALLTOKEN);
m_spriteBank->printFT4(fh1,x,y,0,0,5); m_spriteBank->printFT4(fh1,x,y,0,0,0);
x+=fh1->W; x+=fh1->W;
sprintf(buf,"x%d",CGameSlotManager::getSlotData()->getNumberOfKelpTokensHeld()); sprintf(buf,"x%d",CGameSlotManager::getSlotData()->getNumberOfKelpTokensHeld());
m_font->setJustification(FontBank::JUST_LEFT); m_font->setJustification(FontBank::JUST_LEFT);