This commit is contained in:
parent
95168c16b2
commit
ff13d67687
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -140,7 +140,6 @@ void CBossText::select()
|
||||
|
||||
CSoundMediator::stopSong();
|
||||
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
||||
CFader::setFadingIn();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -262,6 +262,7 @@ void CGameScene::render()
|
||||
switch(m_gamestate)
|
||||
{
|
||||
case GAMESTATE_SHOWING_LIVES:
|
||||
case GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT:
|
||||
render_showing_lives();
|
||||
break;
|
||||
case GAMESTATE_PLAYING:
|
||||
@ -327,8 +328,15 @@ void CGameScene::render_showing_lives()
|
||||
setXY3(ft3,512,512,512,512,512,512);
|
||||
AddPrimToList(ft3,0);
|
||||
|
||||
if(m_gamestate==GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||
{
|
||||
m_bossText->render();
|
||||
}
|
||||
else
|
||||
{
|
||||
render_playing();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CGameScene::render_playing()
|
||||
@ -388,6 +396,9 @@ void CGameScene::think(int _frames)
|
||||
case GAMESTATE_SHOWING_LIVES:
|
||||
think_showing_lives(_frames);
|
||||
break;
|
||||
case GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT:
|
||||
think_showing_lives(_frames);
|
||||
break;
|
||||
case GAMESTATE_PLAYING:
|
||||
think_playing(_frames);
|
||||
break;
|
||||
@ -444,6 +455,8 @@ void CGameScene::think(int _frames)
|
||||
|
||||
/*****************************************************************************/
|
||||
void CGameScene::think_showing_lives(int _frames)
|
||||
{
|
||||
if(m_gamestate!=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||
{
|
||||
if(m_showingLivesTimer==0)
|
||||
{
|
||||
@ -453,6 +466,7 @@ void CGameScene::think_showing_lives(int _frames)
|
||||
{
|
||||
think_playing(_frames);
|
||||
}
|
||||
}
|
||||
|
||||
if(PadGetDown(0)&PAD_CROSS&&m_showingLivesTimer<TIME_TO_DISPLAY_LIVES_COUNT)
|
||||
{
|
||||
@ -467,9 +481,16 @@ void CGameScene::think_showing_lives(int _frames)
|
||||
m_showingLivesTimer+=_frames;
|
||||
|
||||
if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>255)
|
||||
{
|
||||
if(m_gamestate!=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||
{
|
||||
m_gamestate=GAMESTATE_PLAYING;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gamestate=GAMESTATE_BOSS_INTRO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -480,12 +501,21 @@ void CGameScene::think_playing(int _frames)
|
||||
return;
|
||||
}
|
||||
|
||||
if(s_justHitBossArenaTrigger&&m_gamestate==GAMESTATE_PLAYING)
|
||||
if(s_justHitBossArenaTrigger)
|
||||
{
|
||||
if(m_gamestate==GAMESTATE_SHOWING_LIVES)
|
||||
{
|
||||
m_bossText->select();
|
||||
m_gamestate=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT;
|
||||
s_justHitBossArenaTrigger=false;
|
||||
}
|
||||
else if(m_gamestate==GAMESTATE_PLAYING)
|
||||
{
|
||||
m_gamestate=GAMESTATE_FADING_INTO_BOSS_INTRO;
|
||||
CFader::setFadingOut();
|
||||
s_justHitBossArenaTrigger=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Auto-timer stuff
|
||||
|
@ -79,6 +79,7 @@ private:
|
||||
typedef enum
|
||||
{
|
||||
GAMESTATE_SHOWING_LIVES,
|
||||
GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT,
|
||||
GAMESTATE_PLAYING,
|
||||
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
||||
GAMESTATE_BOSS_INTRO,
|
||||
|
Loading…
Reference in New Issue
Block a user