This commit is contained in:
parent
314cc34a9b
commit
9087fd50e2
@ -613,6 +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]
|
||||||
|
eng=Continue
|
||||||
|
[STR__BOSS__TRIANGLE_BUTTON]
|
||||||
|
eng=Next page..
|
||||||
|
|
||||||
|
|
||||||
[STR__CHAPTER_1__BOSS_TITLE]
|
[STR__CHAPTER_1__BOSS_TITLE]
|
||||||
eng=Mother Jellyfish...
|
eng=Mother Jellyfish...
|
||||||
|
@ -205,7 +205,8 @@ fma_src := fma
|
|||||||
|
|
||||||
fmv_src := fmv
|
fmv_src := fmv
|
||||||
|
|
||||||
game_src := convo \
|
game_src := bosstext \
|
||||||
|
convo \
|
||||||
game \
|
game \
|
||||||
gamebubs \
|
gamebubs \
|
||||||
gameslot \
|
gameslot \
|
||||||
|
@ -38,6 +38,14 @@
|
|||||||
#include "level\level.h"
|
#include "level\level.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_FADER_H__
|
||||||
|
#include "gfx\fader.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_ACTOR__H__
|
||||||
|
#include "gfx/actor.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
@ -80,14 +88,29 @@ const CBossText::BOSS_DATA CBossText::s_bossData[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Evil global pointer to the boss character
|
||||||
|
extern CThing *g_bossThing;
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
int forcelevel=0;
|
||||||
void CBossText::init()
|
void CBossText::init()
|
||||||
{
|
{
|
||||||
|
// if(GameScene.GetLevel().getLevelNumer()
|
||||||
|
m_scalableFontBank=new ("font") ScalableFontBank();
|
||||||
|
m_scalableFontBank->initialise(&standardFont);
|
||||||
|
m_scalableFontBank->setPrintArea(20,0,512-40,256);
|
||||||
|
m_scalableFontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
|
|
||||||
|
m_fontBank=new ("CGameScene::Init") FontBank();
|
||||||
|
m_fontBank->initialise( &standardFont );
|
||||||
|
m_fontBank->setPrintArea(20,0,512-40,256);
|
||||||
|
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -98,6 +121,8 @@ void CBossText::init()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBossText::shutdown()
|
void CBossText::shutdown()
|
||||||
{
|
{
|
||||||
|
m_fontBank->dump(); delete m_fontBank;
|
||||||
|
m_scalableFontBank->dump(); delete m_scalableFontBank;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -108,8 +133,14 @@ void CBossText::shutdown()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBossText::select()
|
void CBossText::select()
|
||||||
{
|
{
|
||||||
// CSoundMediator::stopSong();
|
// ASSERT if(GameScene.GetLevel().getLevelNumer()
|
||||||
// CSoundMediator::setSong(s_bossData[Level.getCurrentChapter()-1].m_songId);
|
|
||||||
|
m_readyToExit=false;
|
||||||
|
m_currentPage=0;
|
||||||
|
|
||||||
|
CSoundMediator::stopSong();
|
||||||
|
CSoundMediator::setSong(s_bossData[forcelevel/*GameScene.GetLevel().getCurrentChapter()-1*/].m_songId);
|
||||||
|
CFader::setFadingIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -120,6 +151,21 @@ void CBossText::select()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBossText::think(int _frames)
|
void CBossText::think(int _frames)
|
||||||
{
|
{
|
||||||
|
if(!CFader::isFading())
|
||||||
|
{
|
||||||
|
int pad;
|
||||||
|
pad=PadGetDown(0);
|
||||||
|
|
||||||
|
if(pad&PAD_TRIANGLE)
|
||||||
|
{
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pad&PAD_CROSS)
|
||||||
|
{
|
||||||
|
m_currentPage^=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -128,13 +174,14 @@ void CBossText::think(int _frames)
|
|||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
DVECTOR pos={256,170};
|
||||||
void CBossText::render()
|
void CBossText::render()
|
||||||
{
|
{
|
||||||
SpriteBank *sb;
|
SpriteBank *sb;
|
||||||
sFrameHdr *fhCorner,*fhSideBorder,*fhTopBorder;
|
sFrameHdr *fhCorner,*fhSideBorder,*fhTopBorder;
|
||||||
int x,y;
|
int x,y;
|
||||||
POLY_F4 *f4;
|
POLY_F4 *f4;
|
||||||
POLY_G4 *g4;
|
POLY_FT4 *ft4;
|
||||||
const BOSS_DATA *bd;
|
const BOSS_DATA *bd;
|
||||||
|
|
||||||
// Scroll effect type thingy stuff
|
// Scroll effect type thingy stuff
|
||||||
@ -144,66 +191,87 @@ void CBossText::render()
|
|||||||
fhTopBorder=sb->getFrameHeader(FRM__HELPBOX3);
|
fhTopBorder=sb->getFrameHeader(FRM__HELPBOX3);
|
||||||
|
|
||||||
// Corners
|
// Corners
|
||||||
sb->printFT4(fhCorner, 0, 0,false,false,4);
|
sb->printFT4(fhCorner, 0, 0,false,false,MAX_OT-2);
|
||||||
sb->printFT4(fhCorner,512, 0,true ,false,4);
|
sb->printFT4(fhCorner,512, 0,true ,false,MAX_OT-2);
|
||||||
sb->printFT4(fhCorner, 0,256,false,true ,4);
|
sb->printFT4(fhCorner, 0,256,false,true ,MAX_OT-2);
|
||||||
sb->printFT4(fhCorner,512,256,true ,true ,4);
|
sb->printFT4(fhCorner,512,256,true ,true ,MAX_OT-2);
|
||||||
|
|
||||||
// Top/bottom
|
// Top/bottom
|
||||||
for(x=fhCorner->W;x<512-fhCorner->W;x+=fhTopBorder->W)
|
for(x=fhCorner->W;x<512-fhCorner->W;x+=fhTopBorder->W)
|
||||||
{
|
{
|
||||||
sb->printFT4(fhTopBorder,x, 0,false,false,4);
|
sb->printFT4(fhTopBorder,x, 0,false,false,MAX_OT-2);
|
||||||
sb->printFT4(fhTopBorder,x,256,false,true ,4);
|
sb->printFT4(fhTopBorder,x,256,false,true ,MAX_OT-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Left/right
|
// Left/right
|
||||||
for(y=fhCorner->H;y<256-fhCorner->H;y+=fhSideBorder->H)
|
for(y=fhCorner->H;y<256-fhCorner->H;y+=fhSideBorder->H)
|
||||||
{
|
{
|
||||||
sb->printFT4(fhSideBorder, 0,y,false,false,4);
|
sb->printFT4(fhSideBorder, 0,y,false,false,MAX_OT-2);
|
||||||
sb->printFT4(fhSideBorder,512,y,true ,false,4);
|
sb->printFT4(fhSideBorder,512,y,true ,false,MAX_OT-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Middle
|
// Middle
|
||||||
f4=GetPrimF4();
|
f4=GetPrimF4();
|
||||||
setXYWH(f4,fhCorner->W,fhCorner->H,512-(fhCorner->W*2),256-(fhCorner->H*2));
|
setXYWH(f4,fhCorner->W,fhCorner->H,512-(fhCorner->W*2),256-(fhCorner->H*2));
|
||||||
setRGB0(f4,224,184,107);
|
setRGB0(f4,224,184,107);
|
||||||
AddPrimToList(f4,5);
|
AddPrimToList(f4,MAX_OT-1);
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
g4=GetPrimG4();
|
f4=GetPrimF4();
|
||||||
setXYWH(g4,0,0,512,256);
|
setXYWH(f4,0,0,512,256);
|
||||||
setRGB0(g4,70,50,60);
|
setRGB0(f4,0,0,0);
|
||||||
setRGB1(g4,70,50,60);
|
AddPrimToList(f4,MAX_OT-1);
|
||||||
setRGB2(g4,50,60,70);
|
|
||||||
setRGB3(g4,50,60,70);
|
|
||||||
AddPrimToList(g4,5);
|
|
||||||
|
|
||||||
// Instructions..
|
// Text
|
||||||
bd=&s_bossData[GameScene.GetLevel().getCurrentChapter()-1];
|
bd=&s_bossData[forcelevel/*GameScene.GetLevel().getCurrentChapter()-1*/];
|
||||||
|
m_fontBank->setColour(118,118,118);
|
||||||
m_scalableFontBank->setTrans(0);
|
m_fontBank->print(256-20,30,STR__BOSS_TEXT_TITLE);
|
||||||
m_scalableFontBank->setSMode(0);
|
if(m_currentPage==0)
|
||||||
m_scalableFontBank->setPrintArea(20,0,512-40,256);
|
{
|
||||||
m_scalableFontBank->setJustification(FontBank::JUST_CENTRE);
|
// Intro
|
||||||
|
m_scalableFontBank->setScale(400);
|
||||||
m_scalableFontBank->setColour(128,128,128);
|
m_scalableFontBank->setColour(128,128,128);
|
||||||
m_fontBank->setTrans(0);
|
m_scalableFontBank->print(256-20,80,bd->m_titleTextId);
|
||||||
m_fontBank->setSMode(0);
|
|
||||||
m_fontBank->setPrintArea(20,0,512-40,256);
|
|
||||||
m_fontBank->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
|
|
||||||
|
|
||||||
m_fontBank->setColour(118,118,118);
|
m_fontBank->setColour(118,118,118);
|
||||||
m_fontBank->print(256-20,25,STR__BOSS_TEXT_TITLE);
|
m_fontBank->print(256-20,190,bd->m_subTitleTextId);
|
||||||
m_scalableFontBank->setScale(300);
|
|
||||||
m_fontBank->setColour(128,128,128);
|
// Boss gfx
|
||||||
m_scalableFontBank->print(256-20,60,bd->m_titleTextId);
|
DVECTOR bossPoss;
|
||||||
|
bossPoss=pos;
|
||||||
|
// g_bossThing;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Instructions
|
||||||
m_fontBank->setColour(118,118,118);
|
m_fontBank->setColour(118,118,118);
|
||||||
m_fontBank->print(256-20,80,bd->m_subTitleTextId);
|
m_fontBank->print(256-20,80,bd->m_instructionsTextId);
|
||||||
m_fontBank->setColour(118,118,118);
|
}
|
||||||
m_fontBank->print(256-20,105,bd->m_instructionsTextId);
|
|
||||||
|
|
||||||
|
|
||||||
m_fontBank->setPrintArea(0,0,256,512);
|
// Button texts..
|
||||||
|
sFrameHdr *fh1,*fh2;
|
||||||
|
int width;
|
||||||
|
|
||||||
|
y=210;
|
||||||
|
|
||||||
|
y+=13;
|
||||||
|
fh1=sb->getFrameHeader(FRM__BUTX);
|
||||||
|
width=fh1->W+10+m_fontBank->getStringWidth(STR__BOSS__CROSS_BUTTON);
|
||||||
|
x=256-(width/2);
|
||||||
|
sb->printFT4(fh1,x,y+3,0,0,0);
|
||||||
|
x+=fh1->W+10;
|
||||||
|
m_fontBank->print(x,y,STR__BOSS__CROSS_BUTTON);
|
||||||
|
|
||||||
|
y+=13;
|
||||||
|
fh1=sb->getFrameHeader(FRM__BUTT);
|
||||||
|
width=fh1->W+10+m_fontBank->getStringWidth(STR__BOSS__TRIANGLE_BUTTON);
|
||||||
|
x=256-(width/2);
|
||||||
|
sb->printFT4(fh1,x,y+3,0,0,0);
|
||||||
|
x+=fh1->W+10;
|
||||||
|
m_fontBank->print(x,y,STR__BOSS__TRIANGLE_BUTTON);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -214,13 +282,21 @@ void CBossText::render()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int CBossText::isReadyToExit()
|
int CBossText::isReadyToExit()
|
||||||
{
|
{
|
||||||
return false;
|
return m_readyToExit&&!CFader::isFading();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
m_gamestate=GAMESTATE_FADING_OUT_OF_BOSS_INTRO;
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CBossText::exit()
|
||||||
|
{
|
||||||
CFader::setFadingOut();
|
CFader::setFadingOut();
|
||||||
|
m_readyToExit=true;
|
||||||
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
end */
|
end */
|
||||||
|
@ -47,6 +47,8 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void exit();
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
u16 m_titleTextId;
|
u16 m_titleTextId;
|
||||||
@ -57,10 +59,12 @@ private:
|
|||||||
static const BOSS_DATA s_bossData[];
|
static const BOSS_DATA s_bossData[];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class FontBank *m_fontBank;
|
class FontBank *m_fontBank;
|
||||||
class ScalableFontBank *m_scalableFontBank;
|
class ScalableFontBank *m_scalableFontBank;
|
||||||
|
|
||||||
|
int m_readyToExit;
|
||||||
|
int m_currentPage;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,6 +107,10 @@
|
|||||||
#include "save\save.h"
|
#include "save\save.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_BOSSTEXT_H__
|
||||||
|
#include "game\bosstext.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gfx\actor.h"
|
#include "gfx\actor.h"
|
||||||
|
|
||||||
static const int RenderZ=378;//256; Increased to make depth less, and SB more visible
|
static const int RenderZ=378;//256; Increased to make depth less, and SB more visible
|
||||||
@ -176,23 +180,9 @@ int CGameScene::s_bossHasBeenKilled;
|
|||||||
int CGameScene::s_justHitBossArenaTrigger;
|
int CGameScene::s_justHitBossArenaTrigger;
|
||||||
DVECTOR CGameScene::s_CamShake={0,0};
|
DVECTOR CGameScene::s_CamShake={0,0};
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
u16 m_titleTextId;
|
|
||||||
u16 m_subTitleTextId;
|
|
||||||
u16 m_instructionsTextId;
|
|
||||||
CSoundMediator::SONGID m_songId;
|
|
||||||
} BOSS_DATA;
|
|
||||||
|
|
||||||
static const BOSS_DATA s_bossData[]=
|
// Evil global pointer to the boss character
|
||||||
{
|
CThing *g_bossThing;
|
||||||
{ STR__CHAPTER_1__BOSS_TITLE, STR__CHAPTER_1__BOSS_SUB_TITLE, STR__CHAPTER_1__BOSS_INSTRUCTIONS, CSoundMediator::SONG_CHAPTER1_BOSS },
|
|
||||||
{ STR__CHAPTER_2__BOSS_TITLE, STR__CHAPTER_2__BOSS_SUB_TITLE, STR__CHAPTER_2__BOSS_INSTRUCTIONS, CSoundMediator::SONG_CHAPTER2_BOSS },
|
|
||||||
{ STR__CHAPTER_3__BOSS_TITLE, STR__CHAPTER_3__BOSS_SUB_TITLE, STR__CHAPTER_3__BOSS_INSTRUCTIONS, CSoundMediator::SONG_CHAPTER3_BOSS_AWAKE },
|
|
||||||
{ STR__CHAPTER_4__BOSS_TITLE, STR__CHAPTER_4__BOSS_SUB_TITLE, STR__CHAPTER_4__BOSS_INSTRUCTIONS, CSoundMediator::SONG_CHAPTER4_BOSS },
|
|
||||||
{ STR__CHAPTER_5__BOSS_TITLE, STR__CHAPTER_5__BOSS_SUB_TITLE, STR__CHAPTER_5__BOSS_INSTRUCTIONS, CSoundMediator::SONG_CHAPTER5_BOSS },
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -222,15 +212,20 @@ void CGameScene::init()
|
|||||||
m_HealthManager= new ("Health Manager") CHealthManager();
|
m_HealthManager= new ("Health Manager") CHealthManager();
|
||||||
m_HealthManager->init();
|
m_HealthManager->init();
|
||||||
|
|
||||||
|
m_bossText->init();
|
||||||
|
|
||||||
s_readyToExit=false;
|
s_readyToExit=false;
|
||||||
s_restartLevel=false;
|
s_restartLevel=false;
|
||||||
|
|
||||||
|
m_bossText=new ("BossText") CBossText();
|
||||||
|
|
||||||
CFader::setFadingIn();
|
CFader::setFadingIn();
|
||||||
CLevel::setIsBossRespawn(false);
|
CLevel::setIsBossRespawn(false);
|
||||||
initLevel();
|
initLevel();
|
||||||
|
|
||||||
m_gamestate=GAMESTATE_SHOWING_LIVES;
|
m_gamestate=GAMESTATE_SHOWING_LIVES;
|
||||||
m_showingLivesTimer=0;
|
m_showingLivesTimer=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// This is a seperate funtion ( and virtual ) so that we can overload it for
|
// This is a seperate funtion ( and virtual ) so that we can overload it for
|
||||||
@ -253,6 +248,8 @@ int CGameScene::canPause()
|
|||||||
|
|
||||||
void CGameScene::shutdown()
|
void CGameScene::shutdown()
|
||||||
{
|
{
|
||||||
|
m_bossText->shutdown(); delete m_bossText;
|
||||||
|
|
||||||
shutdownLevel();
|
shutdownLevel();
|
||||||
|
|
||||||
m_pauseMenu->shutdown(); delete m_pauseMenu;
|
m_pauseMenu->shutdown(); delete m_pauseMenu;
|
||||||
@ -275,8 +272,7 @@ void CGameScene::render()
|
|||||||
render_playing();
|
render_playing();
|
||||||
break;
|
break;
|
||||||
case GAMESTATE_BOSS_INTRO:
|
case GAMESTATE_BOSS_INTRO:
|
||||||
case GAMESTATE_FADING_OUT_OF_BOSS_INTRO:
|
m_bossText->render();
|
||||||
render_boss_intro();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,85 +367,6 @@ void CGameScene::render_playing()
|
|||||||
CActorPool::CleanUpCache();
|
CActorPool::CleanUpCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CGameScene::render_boss_intro()
|
|
||||||
{
|
|
||||||
SpriteBank *sb;
|
|
||||||
sFrameHdr *fhCorner,*fhSideBorder,*fhTopBorder;
|
|
||||||
int x,y;
|
|
||||||
POLY_F4 *f4;
|
|
||||||
POLY_G4 *g4;
|
|
||||||
const BOSS_DATA *bd;
|
|
||||||
|
|
||||||
// Scroll effect type thingy stuff
|
|
||||||
sb=getSpriteBank();
|
|
||||||
fhCorner=sb->getFrameHeader(FRM__HELPBOX1);
|
|
||||||
fhSideBorder=sb->getFrameHeader(FRM__HELPBOX2);
|
|
||||||
fhTopBorder=sb->getFrameHeader(FRM__HELPBOX3);
|
|
||||||
|
|
||||||
// Corners
|
|
||||||
sb->printFT4(fhCorner, 0, 0,false,false,4);
|
|
||||||
sb->printFT4(fhCorner,512, 0,true ,false,4);
|
|
||||||
sb->printFT4(fhCorner, 0,256,false,true ,4);
|
|
||||||
sb->printFT4(fhCorner,512,256,true ,true ,4);
|
|
||||||
|
|
||||||
// Top/bottom
|
|
||||||
for(x=fhCorner->W;x<512-fhCorner->W;x+=fhTopBorder->W)
|
|
||||||
{
|
|
||||||
sb->printFT4(fhTopBorder,x, 0,false,false,4);
|
|
||||||
sb->printFT4(fhTopBorder,x,256,false,true ,4);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Left/right
|
|
||||||
for(y=fhCorner->H;y<256-fhCorner->H;y+=fhSideBorder->H)
|
|
||||||
{
|
|
||||||
sb->printFT4(fhSideBorder, 0,y,false,false,4);
|
|
||||||
sb->printFT4(fhSideBorder,512,y,true ,false,4);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Middle
|
|
||||||
f4=GetPrimF4();
|
|
||||||
setXYWH(f4,fhCorner->W,fhCorner->H,512-(fhCorner->W*2),256-(fhCorner->H*2));
|
|
||||||
setRGB0(f4,224,184,107);
|
|
||||||
AddPrimToList(f4,5);
|
|
||||||
|
|
||||||
// Background
|
|
||||||
g4=GetPrimG4();
|
|
||||||
setXYWH(g4,0,0,512,256);
|
|
||||||
setRGB0(g4,70,50,60);
|
|
||||||
setRGB1(g4,70,50,60);
|
|
||||||
setRGB2(g4,50,60,70);
|
|
||||||
setRGB3(g4,50,60,70);
|
|
||||||
AddPrimToList(g4,5);
|
|
||||||
|
|
||||||
// Instructions..
|
|
||||||
bd=&s_bossData[Level.getCurrentChapter()-1];
|
|
||||||
|
|
||||||
m_scalableFont->setTrans(0);
|
|
||||||
m_scalableFont->setSMode(0);
|
|
||||||
m_scalableFont->setPrintArea(20,0,512-40,256);
|
|
||||||
m_scalableFont->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
m_scalableFont->setColour(128,128,128);
|
|
||||||
s_genericFont->setTrans(0);
|
|
||||||
s_genericFont->setSMode(0);
|
|
||||||
s_genericFont->setPrintArea(20,0,512-40,256);
|
|
||||||
s_genericFont->setJustification(FontBank::JUST_CENTRE);
|
|
||||||
|
|
||||||
|
|
||||||
s_genericFont->setColour(118,118,118);
|
|
||||||
s_genericFont->print(256-20,25,STR__BOSS_TEXT_TITLE);
|
|
||||||
m_scalableFont->setScale(300);
|
|
||||||
s_genericFont->setColour(128,128,128);
|
|
||||||
m_scalableFont->print(256-20,60,bd->m_titleTextId);
|
|
||||||
s_genericFont->setColour(118,118,118);
|
|
||||||
s_genericFont->print(256-20,80,bd->m_subTitleTextId);
|
|
||||||
s_genericFont->setColour(118,118,118);
|
|
||||||
s_genericFont->print(256-20,105,bd->m_instructionsTextId);
|
|
||||||
|
|
||||||
|
|
||||||
s_genericFont->setPrintArea(0,0,256,512);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::think(int _frames)
|
void CGameScene::think(int _frames)
|
||||||
{
|
{
|
||||||
@ -473,26 +390,32 @@ void CGameScene::think(int _frames)
|
|||||||
case GAMESTATE_FADING_INTO_BOSS_INTRO:
|
case GAMESTATE_FADING_INTO_BOSS_INTRO:
|
||||||
if(!CFader::isFading())
|
if(!CFader::isFading())
|
||||||
{
|
{
|
||||||
// Swap to the boss tune whilst it's all quiet! :)
|
m_bossText->select();
|
||||||
CSoundMediator::stopSong();
|
|
||||||
CSoundMediator::setSong(s_bossData[Level.getCurrentChapter()-1].m_songId);
|
|
||||||
m_gamestate=GAMESTATE_BOSS_INTRO;
|
m_gamestate=GAMESTATE_BOSS_INTRO;
|
||||||
CFader::setFadingIn();
|
CFader::setFadingIn();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GAMESTATE_BOSS_INTRO:
|
case GAMESTATE_BOSS_INTRO:
|
||||||
think_boss_intro(_frames);
|
m_bossText->think(_frames);
|
||||||
break;
|
if(m_bossText->isReadyToExit())
|
||||||
case GAMESTATE_FADING_OUT_OF_BOSS_INTRO:
|
|
||||||
if(!CFader::isFading())
|
|
||||||
{
|
{
|
||||||
m_gamestate=GAMESTATE_PLAYING;
|
m_gamestate=GAMESTATE_PLAYING;
|
||||||
CSoundMediator::playSong();
|
CSoundMediator::playSong();
|
||||||
|
sendEvent( BOSS_FOUND_EVENT, NULL );
|
||||||
CFader::setFadingIn();
|
CFader::setFadingIn();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
#if defined (__USER_paul__) || defined (__USER_charles__)
|
||||||
|
if(PadGetDown(0)&PAD_UP)
|
||||||
|
{
|
||||||
|
s_justHitBossArenaTrigger=true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
#ifdef __VERSION_DEBUG__
|
#ifdef __VERSION_DEBUG__
|
||||||
#if defined (__USER_paul__) || defined (__USER_daveo__) || defined (__USER_charles__)
|
#if defined (__USER_paul__) || defined (__USER_daveo__) || defined (__USER_charles__)
|
||||||
@ -715,21 +638,6 @@ void CGameScene::think_playing(int _frames)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CGameScene::think_boss_intro(int _frames)
|
|
||||||
{
|
|
||||||
if(!CFader::isFading())
|
|
||||||
{
|
|
||||||
if(PadGetDown(0)&PAD_CROSS)
|
|
||||||
{
|
|
||||||
m_gamestate=GAMESTATE_FADING_OUT_OF_BOSS_INTRO;
|
|
||||||
CFader::setFadingOut();
|
|
||||||
sendEvent( BOSS_FOUND_EVENT, NULL );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int CGameScene::readyToShutdown()
|
int CGameScene::readyToShutdown()
|
||||||
{
|
{
|
||||||
@ -794,6 +702,8 @@ void CGameScene::hitBossArenaTrigger()
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::initLevel()
|
void CGameScene::initLevel()
|
||||||
{
|
{
|
||||||
|
g_bossThing=NULL;
|
||||||
|
|
||||||
CSoundMediator::setCanPlaySfx(false);
|
CSoundMediator::setCanPlaySfx(false);
|
||||||
Level.DisplayLoadingScreen(s_globalLevelSelectThing);
|
Level.DisplayLoadingScreen(s_globalLevelSelectThing);
|
||||||
|
|
||||||
|
@ -77,7 +77,6 @@ private:
|
|||||||
GAMESTATE_PLAYING,
|
GAMESTATE_PLAYING,
|
||||||
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
||||||
GAMESTATE_BOSS_INTRO,
|
GAMESTATE_BOSS_INTRO,
|
||||||
GAMESTATE_FADING_OUT_OF_BOSS_INTRO,
|
|
||||||
}GAMESTATE;
|
}GAMESTATE;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -92,10 +91,10 @@ private:
|
|||||||
|
|
||||||
void think_showing_lives(int _frames);
|
void think_showing_lives(int _frames);
|
||||||
void think_playing(int _frames);
|
void think_playing(int _frames);
|
||||||
void think_boss_intro(int _frames);
|
|
||||||
void render_showing_lives();
|
void render_showing_lives();
|
||||||
void render_playing();
|
void render_playing();
|
||||||
void render_boss_intro();
|
|
||||||
|
class CBossText *m_bossText;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user