This commit is contained in:
parent
f7b88f2258
commit
cb19d3b727
3 changed files with 40 additions and 28 deletions
|
@ -613,9 +613,11 @@ eng=Snail Race
|
||||||
[STR__BOSS_TEXT_TITLE]
|
[STR__BOSS_TEXT_TITLE]
|
||||||
eng=Boss Hints From Mermaid Man and Barnacle Boy's Superhero Handbook
|
eng=Boss Hints From Mermaid Man and Barnacle Boy's Superhero Handbook
|
||||||
|
|
||||||
[STR__BOSS__CROSS_BUTTON]
|
[STR__BOSS__NEXT]
|
||||||
eng=Next page
|
eng=Next page
|
||||||
[STR__BOSS__TRIANGLE_BUTTON]
|
[STR__BOSS__PREVIOUS]
|
||||||
|
eng=Previous page
|
||||||
|
[STR__BOSS__CONTINUE]
|
||||||
eng=Continue
|
eng=Continue
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -101,16 +101,15 @@ extern CThing *g_bossThing;
|
||||||
int forcelevel=0;
|
int forcelevel=0;
|
||||||
void CBossText::init()
|
void CBossText::init()
|
||||||
{
|
{
|
||||||
// if(GameScene.GetLevel().getLevelNumer()
|
m_scalableFontBank=new ("font") ScalableFontBank();
|
||||||
m_scalableFontBank=new ("font") ScalableFontBank();
|
m_scalableFontBank->initialise(&standardFont);
|
||||||
m_scalableFontBank->initialise(&standardFont);
|
m_scalableFontBank->setPrintArea(20,0,512-40,256);
|
||||||
m_scalableFontBank->setPrintArea(20,0,512-40,256);
|
m_scalableFontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
m_scalableFontBank->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
|
|
||||||
m_fontBank=new ("CGameScene::Init") FontBank();
|
m_fontBank=new ("CGameScene::Init") FontBank();
|
||||||
m_fontBank->initialise( &standardFont );
|
m_fontBank->initialise( &standardFont );
|
||||||
m_fontBank->setPrintArea(20,0,512-40,256);
|
m_fontBank->setPrintArea(20,0,512-40,256);
|
||||||
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -133,13 +132,11 @@ void CBossText::shutdown()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBossText::select()
|
void CBossText::select()
|
||||||
{
|
{
|
||||||
// ASSERT if(GameScene.GetLevel().getLevelNumer()
|
|
||||||
|
|
||||||
m_readyToExit=false;
|
m_readyToExit=false;
|
||||||
m_currentPage=0;
|
m_currentPage=0;
|
||||||
|
|
||||||
CSoundMediator::stopSong();
|
CSoundMediator::stopSong();
|
||||||
CSoundMediator::setSong(s_bossData[forcelevel/*GameScene.GetLevel().getCurrentChapter()-1*/].m_songId);
|
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
||||||
CFader::setFadingIn();
|
CFader::setFadingIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,14 +153,17 @@ void CBossText::think(int _frames)
|
||||||
int pad;
|
int pad;
|
||||||
pad=PadGetDown(0);
|
pad=PadGetDown(0);
|
||||||
|
|
||||||
if(pad&PAD_TRIANGLE)
|
if(pad&PAD_CROSS)
|
||||||
{
|
{
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
else if(pad&PAD_DOWN&&m_currentPage==0)
|
||||||
if(pad&PAD_CROSS)
|
|
||||||
{
|
{
|
||||||
m_currentPage^=1;
|
m_currentPage=1;
|
||||||
|
}
|
||||||
|
else if(pad&PAD_UP&&m_currentPage==1)
|
||||||
|
{
|
||||||
|
m_currentPage=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ void CBossText::render()
|
||||||
AddPrimToList(f4,MAX_OT-1);
|
AddPrimToList(f4,MAX_OT-1);
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
bd=&s_bossData[forcelevel/*GameScene.GetLevel().getCurrentChapter()-1*/];
|
bd=&s_bossData[GameScene.GetLevel().getCurrentChapter()-1];
|
||||||
m_fontBank->setColour(118,118,118);
|
m_fontBank->setColour(118,118,118);
|
||||||
m_fontBank->print(256-20,30,STR__BOSS_TEXT_TITLE);
|
m_fontBank->print(256-20,30,STR__BOSS_TEXT_TITLE);
|
||||||
if(m_currentPage==0)
|
if(m_currentPage==0)
|
||||||
|
@ -253,22 +253,32 @@ void CBossText::render()
|
||||||
// Button texts..
|
// Button texts..
|
||||||
sFrameHdr *fh1,*fh2;
|
sFrameHdr *fh1,*fh2;
|
||||||
int width;
|
int width;
|
||||||
|
int text;
|
||||||
|
|
||||||
m_fontBank->setJustification(FontBank::JUST_LEFT);
|
m_fontBank->setJustification(FontBank::JUST_LEFT);
|
||||||
|
|
||||||
fh1=sb->getFrameHeader(FRM__BUTX);
|
if(m_currentPage==0)
|
||||||
width=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__BOSS__CROSS_BUTTON);
|
{
|
||||||
|
text=STR__BOSS__NEXT;
|
||||||
|
fh1=sb->getFrameHeader(FRM__BUTD);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text=STR__BOSS__PREVIOUS;
|
||||||
|
fh1=sb->getFrameHeader(FRM__BUTU);
|
||||||
|
}
|
||||||
|
width=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(text);
|
||||||
x=128-(width/2);
|
x=128-(width/2);
|
||||||
sb->printFT4(fh1,x,INSTRUCTIONS_Y_POS+INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
sb->printFT4(fh1,x,INSTRUCTIONS_Y_POS+INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
x+=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
x+=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
||||||
m_fontBank->print(x,INSTRUCTIONS_Y_POS,STR__BOSS__CROSS_BUTTON);
|
m_fontBank->print(x,INSTRUCTIONS_Y_POS,text);
|
||||||
|
|
||||||
fh1=sb->getFrameHeader(FRM__BUTT);
|
fh1=sb->getFrameHeader(FRM__BUTX);
|
||||||
width=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__BOSS__TRIANGLE_BUTTON);
|
width=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT+m_fontBank->getStringWidth(STR__BOSS__CONTINUE);
|
||||||
x=256+128-(width/2);
|
x=256+128-(width/2);
|
||||||
sb->printFT4(fh1,x,INSTRUCTIONS_Y_POS+INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
sb->printFT4(fh1,x,INSTRUCTIONS_Y_POS+INSTRUCTIONS_BUTTON_Y_OFFSET,0,0,0);
|
||||||
x+=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
x+=fh1->W+INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT;
|
||||||
m_fontBank->print(x,INSTRUCTIONS_Y_POS,STR__BOSS__TRIANGLE_BUTTON);
|
m_fontBank->print(x,INSTRUCTIONS_Y_POS,STR__BOSS__CONTINUE);
|
||||||
|
|
||||||
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,9 @@ private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
INSTRUCTIONS_Y_POS=215,
|
INSTRUCTIONS_Y_POS=213,
|
||||||
INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=2,
|
INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=-15, // Eh!? (pkg)
|
||||||
INSTRUCTIONS_BUTTON_Y_OFFSET=3,
|
INSTRUCTIONS_BUTTON_Y_OFFSET=4,
|
||||||
};
|
};
|
||||||
|
|
||||||
class FontBank *m_fontBank;
|
class FontBank *m_fontBank;
|
||||||
|
|
Loading…
Add table
Reference in a new issue