This commit is contained in:
Paul 2001-05-11 21:35:08 +00:00
parent c48fce126a
commit 1cf2f4ef81
6 changed files with 55 additions and 6 deletions

View File

@ -145,10 +145,12 @@ void CFrontEndMainTitles::init()
50,20,200,20,
STR__FRONTEND__OPTIONS,
&m_gotoOptionsFlag,true);
#ifdef __E3__
CGUIFactory::createValueButtonFrame(m_mainMenu,
50,40,200,20,
STR__FRONTEND__CREDITS,
&m_gotoCreditsFlag,true);
#endif
}
/*----------------------------------------------------------------------
@ -372,7 +374,7 @@ CFrontEndScene::FrontEndMode CFrontEndMainTitles::getNextMode()
break;
case MODE__GOTO_CHOOSE_SLOT:
ret=CFrontEndScene::MODE__CHOOSE_SLOT;
ret=CFrontEndScene::MODE__EXIT_TO_MAP;
break;
case MODE__GOTO_OPTIONS:

View File

@ -244,8 +244,16 @@ void CGameScene::think(int _frames)
s_levelFinished=false;
}
else if (s_restartLevel)
{
if(m_player->getLivesLeft()!=0)
{
respawnLevel();
}
else
{
s_readyToExit=true;
GameState::setNextScene(&FrontEndScene);
}
s_restartLevel=false;
}

View File

@ -89,6 +89,8 @@ void CPauseMenu::init()
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);
int xpos=TEXT_SPACING/2;
#ifdef __E3__
CGUIFactory::createValueButtonFrame(m_guiFrame,
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
STR__PAUSE_MENU__CONTINUE,
@ -121,7 +123,6 @@ void CPauseMenu::init()
STR__DEBUG__BALLOON_MODE,
&newmode,PLAYER_MODE_BALLOON);
xpos+=TEXT_SPACING;
//#ifndef __USER_paul__
CGUIFactory::createValueButtonFrame(m_guiFrame,
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
STR__DEBUG__BUBBLEMIXTURE_MODE,
@ -147,7 +148,26 @@ void CPauseMenu::init()
STR__DEBUG__DEAD_MODE,
&newmode,PLAYER_MODE_DEAD);
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;
}

View File

@ -134,6 +134,7 @@ extern int s_globalLevelSelectThing;
---------------------------------------------------------------------- */
void CMapScene::init()
{
#ifdef __E3__
m_font=new ("map screen font") FontBank();
m_font->initialise(&standardFont);
m_font->setJustification(FontBank::JUST_CENTRE);
@ -149,7 +150,7 @@ void CMapScene::init()
m_screenImage=MemAlloc(512*256*2,"MapScreen");
generateMapScreenImage();
SetScreenImage((u8*)m_screenImage);
#endif
m_readyToExit=false;
// CFader::setFadingIn(CFader::BLACK_FADE);
@ -164,10 +165,12 @@ void CMapScene::init()
---------------------------------------------------------------------- */
void CMapScene::shutdown()
{
#ifdef __E3__
ClearScreenImage();
MemFree(m_screenImage);
m_spriteBank->dump(); delete m_spriteBank;
m_font->dump(); delete m_font;
#endif
}
@ -179,6 +182,7 @@ void CMapScene::shutdown()
---------------------------------------------------------------------- */
void CMapScene::render()
{
#ifdef __E3__
int i,x,y,xpos,ypos;
int compilerGetsComfused;
char spatCount[10];
@ -219,6 +223,7 @@ m_font->setColour(0,255,0);
m_font->print(24,24,buf);
m_font->setColour(0,0,0);
m_font->print(25,25,buf);
#endif
}
@ -230,6 +235,7 @@ m_font->print(25,25,buf);
---------------------------------------------------------------------- */
void CMapScene::think(int _frames)
{
#ifdef __E3__
if(!CFader::isFading()&&!m_readyToExit)
{
// Change chapter
@ -308,6 +314,14 @@ void CMapScene::think(int _frames)
GameState::setNextScene(&GameScene);
}
}
#else
if(!m_readyToExit)
{
s_globalLevelSelectThing=0;
m_readyToExit=true;
GameState::setNextScene(&GameScene);
}
#endif
}

View File

@ -549,7 +549,7 @@ void CPlayer::init()
m_animNo=0;
m_animFrame=0;
setFacing(FACING_RIGHT);
respawn();
m_lives++;respawn();
m_lives=CGameSlotManager::getSlotData()->m_lives;
@ -910,6 +910,7 @@ void CPlayer::render()
CPlayerThing::render();
#ifdef __E3__
#ifdef _STATE_DEBUG_
char buf[100];
#ifdef __USER_paul__
@ -919,6 +920,7 @@ sprintf(buf,"Pos: %04d,%04d",Pos.vx,Pos.vy);
#endif
m_fontBank->print(stateDebugX,stateDebugY,buf);
#endif
#endif
#ifdef __USER_paul__
@ -1420,6 +1422,8 @@ void CPlayer::respawn()
clearPlatform();
updateCollisionArea();
m_lives--;
}

View File

@ -251,6 +251,7 @@ public:
void respawn();
int getLivesLeft() {return m_lives;}
public: