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::stopSong();
|
||||||
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
||||||
CFader::setFadingIn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -262,6 +262,7 @@ void CGameScene::render()
|
|||||||
switch(m_gamestate)
|
switch(m_gamestate)
|
||||||
{
|
{
|
||||||
case GAMESTATE_SHOWING_LIVES:
|
case GAMESTATE_SHOWING_LIVES:
|
||||||
|
case GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT:
|
||||||
render_showing_lives();
|
render_showing_lives();
|
||||||
break;
|
break;
|
||||||
case GAMESTATE_PLAYING:
|
case GAMESTATE_PLAYING:
|
||||||
@ -327,7 +328,14 @@ void CGameScene::render_showing_lives()
|
|||||||
setXY3(ft3,512,512,512,512,512,512);
|
setXY3(ft3,512,512,512,512,512,512);
|
||||||
AddPrimToList(ft3,0);
|
AddPrimToList(ft3,0);
|
||||||
|
|
||||||
render_playing();
|
if(m_gamestate==GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||||
|
{
|
||||||
|
m_bossText->render();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
render_playing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -388,6 +396,9 @@ void CGameScene::think(int _frames)
|
|||||||
case GAMESTATE_SHOWING_LIVES:
|
case GAMESTATE_SHOWING_LIVES:
|
||||||
think_showing_lives(_frames);
|
think_showing_lives(_frames);
|
||||||
break;
|
break;
|
||||||
|
case GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT:
|
||||||
|
think_showing_lives(_frames);
|
||||||
|
break;
|
||||||
case GAMESTATE_PLAYING:
|
case GAMESTATE_PLAYING:
|
||||||
think_playing(_frames);
|
think_playing(_frames);
|
||||||
break;
|
break;
|
||||||
@ -445,13 +456,16 @@ void CGameScene::think(int _frames)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::think_showing_lives(int _frames)
|
void CGameScene::think_showing_lives(int _frames)
|
||||||
{
|
{
|
||||||
if(m_showingLivesTimer==0)
|
if(m_gamestate!=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||||
{
|
{
|
||||||
think_playing(0);
|
if(m_showingLivesTimer==0)
|
||||||
}
|
{
|
||||||
else if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>128)
|
think_playing(0);
|
||||||
{
|
}
|
||||||
think_playing(_frames);
|
else if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>128)
|
||||||
|
{
|
||||||
|
think_playing(_frames);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PadGetDown(0)&PAD_CROSS&&m_showingLivesTimer<TIME_TO_DISPLAY_LIVES_COUNT)
|
if(PadGetDown(0)&PAD_CROSS&&m_showingLivesTimer<TIME_TO_DISPLAY_LIVES_COUNT)
|
||||||
@ -468,7 +482,14 @@ void CGameScene::think_showing_lives(int _frames)
|
|||||||
|
|
||||||
if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>255)
|
if((m_showingLivesTimer-TIME_TO_DISPLAY_LIVES_COUNT)*SPEED_OF_FADE>255)
|
||||||
{
|
{
|
||||||
m_gamestate=GAMESTATE_PLAYING;
|
if(m_gamestate!=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT)
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_PLAYING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_BOSS_INTRO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,11 +501,20 @@ void CGameScene::think_playing(int _frames)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(s_justHitBossArenaTrigger&&m_gamestate==GAMESTATE_PLAYING)
|
if(s_justHitBossArenaTrigger)
|
||||||
{
|
{
|
||||||
m_gamestate=GAMESTATE_FADING_INTO_BOSS_INTRO;
|
if(m_gamestate==GAMESTATE_SHOWING_LIVES)
|
||||||
CFader::setFadingOut();
|
{
|
||||||
s_justHitBossArenaTrigger=false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ private:
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GAMESTATE_SHOWING_LIVES,
|
GAMESTATE_SHOWING_LIVES,
|
||||||
|
GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT,
|
||||||
GAMESTATE_PLAYING,
|
GAMESTATE_PLAYING,
|
||||||
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
||||||
GAMESTATE_BOSS_INTRO,
|
GAMESTATE_BOSS_INTRO,
|
||||||
|
Loading…
Reference in New Issue
Block a user