This commit is contained in:
parent
c48fce126a
commit
1cf2f4ef81
@ -145,10 +145,12 @@ void CFrontEndMainTitles::init()
|
|||||||
50,20,200,20,
|
50,20,200,20,
|
||||||
STR__FRONTEND__OPTIONS,
|
STR__FRONTEND__OPTIONS,
|
||||||
&m_gotoOptionsFlag,true);
|
&m_gotoOptionsFlag,true);
|
||||||
|
#ifdef __E3__
|
||||||
CGUIFactory::createValueButtonFrame(m_mainMenu,
|
CGUIFactory::createValueButtonFrame(m_mainMenu,
|
||||||
50,40,200,20,
|
50,40,200,20,
|
||||||
STR__FRONTEND__CREDITS,
|
STR__FRONTEND__CREDITS,
|
||||||
&m_gotoCreditsFlag,true);
|
&m_gotoCreditsFlag,true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -372,7 +374,7 @@ CFrontEndScene::FrontEndMode CFrontEndMainTitles::getNextMode()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MODE__GOTO_CHOOSE_SLOT:
|
case MODE__GOTO_CHOOSE_SLOT:
|
||||||
ret=CFrontEndScene::MODE__CHOOSE_SLOT;
|
ret=CFrontEndScene::MODE__EXIT_TO_MAP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODE__GOTO_OPTIONS:
|
case MODE__GOTO_OPTIONS:
|
||||||
|
@ -244,8 +244,16 @@ void CGameScene::think(int _frames)
|
|||||||
s_levelFinished=false;
|
s_levelFinished=false;
|
||||||
}
|
}
|
||||||
else if (s_restartLevel)
|
else if (s_restartLevel)
|
||||||
|
{
|
||||||
|
if(m_player->getLivesLeft()!=0)
|
||||||
{
|
{
|
||||||
respawnLevel();
|
respawnLevel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s_readyToExit=true;
|
||||||
|
GameState::setNextScene(&FrontEndScene);
|
||||||
|
}
|
||||||
s_restartLevel=false;
|
s_restartLevel=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +89,8 @@ void CPauseMenu::init()
|
|||||||
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
|
||||||
|
|
||||||
int xpos=TEXT_SPACING/2;
|
int xpos=TEXT_SPACING/2;
|
||||||
|
|
||||||
|
#ifdef __E3__
|
||||||
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__PAUSE_MENU__CONTINUE,
|
STR__PAUSE_MENU__CONTINUE,
|
||||||
@ -121,7 +123,6 @@ void CPauseMenu::init()
|
|||||||
STR__DEBUG__BALLOON_MODE,
|
STR__DEBUG__BALLOON_MODE,
|
||||||
&newmode,PLAYER_MODE_BALLOON);
|
&newmode,PLAYER_MODE_BALLOON);
|
||||||
xpos+=TEXT_SPACING;
|
xpos+=TEXT_SPACING;
|
||||||
//#ifndef __USER_paul__
|
|
||||||
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
||||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
STR__DEBUG__BUBBLEMIXTURE_MODE,
|
STR__DEBUG__BUBBLEMIXTURE_MODE,
|
||||||
@ -147,7 +148,26 @@ void CPauseMenu::init()
|
|||||||
STR__DEBUG__DEAD_MODE,
|
STR__DEBUG__DEAD_MODE,
|
||||||
&newmode,PLAYER_MODE_DEAD);
|
&newmode,PLAYER_MODE_DEAD);
|
||||||
xpos+=TEXT_SPACING;
|
xpos+=TEXT_SPACING;
|
||||||
//#endif
|
#else
|
||||||
|
xpos+=TEXT_SPACING*2;
|
||||||
|
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
||||||
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
|
STR__PAUSE_MENU__CONTINUE,
|
||||||
|
&m_exitPauseMenuFlag,true);
|
||||||
|
xpos+=TEXT_SPACING*2;
|
||||||
|
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
||||||
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
|
STR__PAUSE_MENU__QUIT,
|
||||||
|
&m_quitGameFlag,true);
|
||||||
|
xpos+=TEXT_SPACING*2;
|
||||||
|
|
||||||
|
|
||||||
|
CGUIFactory::createCycleButtonFrame(m_guiFrame,
|
||||||
|
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||||
|
STR__INVINCIBILE_SPONGEBOB,
|
||||||
|
&invincibleSponge,inv_data,inv_readoutdata);
|
||||||
|
xpos+=TEXT_SPACING*2;
|
||||||
|
#endif
|
||||||
|
|
||||||
m_active=false;
|
m_active=false;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,7 @@ extern int s_globalLevelSelectThing;
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::init()
|
void CMapScene::init()
|
||||||
{
|
{
|
||||||
|
#ifdef __E3__
|
||||||
m_font=new ("map screen font") FontBank();
|
m_font=new ("map screen font") FontBank();
|
||||||
m_font->initialise(&standardFont);
|
m_font->initialise(&standardFont);
|
||||||
m_font->setJustification(FontBank::JUST_CENTRE);
|
m_font->setJustification(FontBank::JUST_CENTRE);
|
||||||
@ -149,7 +150,7 @@ void CMapScene::init()
|
|||||||
m_screenImage=MemAlloc(512*256*2,"MapScreen");
|
m_screenImage=MemAlloc(512*256*2,"MapScreen");
|
||||||
generateMapScreenImage();
|
generateMapScreenImage();
|
||||||
SetScreenImage((u8*)m_screenImage);
|
SetScreenImage((u8*)m_screenImage);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_readyToExit=false;
|
m_readyToExit=false;
|
||||||
// CFader::setFadingIn(CFader::BLACK_FADE);
|
// CFader::setFadingIn(CFader::BLACK_FADE);
|
||||||
@ -164,10 +165,12 @@ void CMapScene::init()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::shutdown()
|
void CMapScene::shutdown()
|
||||||
{
|
{
|
||||||
|
#ifdef __E3__
|
||||||
ClearScreenImage();
|
ClearScreenImage();
|
||||||
MemFree(m_screenImage);
|
MemFree(m_screenImage);
|
||||||
m_spriteBank->dump(); delete m_spriteBank;
|
m_spriteBank->dump(); delete m_spriteBank;
|
||||||
m_font->dump(); delete m_font;
|
m_font->dump(); delete m_font;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -179,6 +182,7 @@ void CMapScene::shutdown()
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::render()
|
void CMapScene::render()
|
||||||
{
|
{
|
||||||
|
#ifdef __E3__
|
||||||
int i,x,y,xpos,ypos;
|
int i,x,y,xpos,ypos;
|
||||||
int compilerGetsComfused;
|
int compilerGetsComfused;
|
||||||
char spatCount[10];
|
char spatCount[10];
|
||||||
@ -219,6 +223,7 @@ m_font->setColour(0,255,0);
|
|||||||
m_font->print(24,24,buf);
|
m_font->print(24,24,buf);
|
||||||
m_font->setColour(0,0,0);
|
m_font->setColour(0,0,0);
|
||||||
m_font->print(25,25,buf);
|
m_font->print(25,25,buf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -230,6 +235,7 @@ m_font->print(25,25,buf);
|
|||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::think(int _frames)
|
void CMapScene::think(int _frames)
|
||||||
{
|
{
|
||||||
|
#ifdef __E3__
|
||||||
if(!CFader::isFading()&&!m_readyToExit)
|
if(!CFader::isFading()&&!m_readyToExit)
|
||||||
{
|
{
|
||||||
// Change chapter
|
// Change chapter
|
||||||
@ -308,6 +314,14 @@ void CMapScene::think(int _frames)
|
|||||||
GameState::setNextScene(&GameScene);
|
GameState::setNextScene(&GameScene);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if(!m_readyToExit)
|
||||||
|
{
|
||||||
|
s_globalLevelSelectThing=0;
|
||||||
|
m_readyToExit=true;
|
||||||
|
GameState::setNextScene(&GameScene);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ void CPlayer::init()
|
|||||||
m_animNo=0;
|
m_animNo=0;
|
||||||
m_animFrame=0;
|
m_animFrame=0;
|
||||||
setFacing(FACING_RIGHT);
|
setFacing(FACING_RIGHT);
|
||||||
respawn();
|
m_lives++;respawn();
|
||||||
|
|
||||||
m_lives=CGameSlotManager::getSlotData()->m_lives;
|
m_lives=CGameSlotManager::getSlotData()->m_lives;
|
||||||
|
|
||||||
@ -910,6 +910,7 @@ void CPlayer::render()
|
|||||||
CPlayerThing::render();
|
CPlayerThing::render();
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __E3__
|
||||||
#ifdef _STATE_DEBUG_
|
#ifdef _STATE_DEBUG_
|
||||||
char buf[100];
|
char buf[100];
|
||||||
#ifdef __USER_paul__
|
#ifdef __USER_paul__
|
||||||
@ -919,6 +920,7 @@ sprintf(buf,"Pos: %04d,%04d",Pos.vx,Pos.vy);
|
|||||||
#endif
|
#endif
|
||||||
m_fontBank->print(stateDebugX,stateDebugY,buf);
|
m_fontBank->print(stateDebugX,stateDebugY,buf);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __USER_paul__
|
#ifdef __USER_paul__
|
||||||
@ -1420,6 +1422,8 @@ void CPlayer::respawn()
|
|||||||
clearPlatform();
|
clearPlatform();
|
||||||
|
|
||||||
updateCollisionArea();
|
updateCollisionArea();
|
||||||
|
|
||||||
|
m_lives--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -251,6 +251,7 @@ public:
|
|||||||
|
|
||||||
void respawn();
|
void respawn();
|
||||||
|
|
||||||
|
int getLivesLeft() {return m_lives;}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user