diff --git a/source/frontend/maintitl.cpp b/source/frontend/maintitl.cpp index 2cf40a915..35129092a 100644 --- a/source/frontend/maintitl.cpp +++ b/source/frontend/maintitl.cpp @@ -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: diff --git a/source/game/game.cpp b/source/game/game.cpp index 73681f869..7a779493b 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -245,7 +245,15 @@ void CGameScene::think(int _frames) } else if (s_restartLevel) { - respawnLevel(); + if(m_player->getLivesLeft()!=0) + { + respawnLevel(); + } + else + { + s_readyToExit=true; + GameState::setNextScene(&FrontEndScene); + } s_restartLevel=false; } diff --git a/source/game/pause.cpp b/source/game/pause.cpp index a7591f319..15d4b91f1 100644 --- a/source/game/pause.cpp +++ b/source/game/pause.cpp @@ -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; } diff --git a/source/map/map.cpp b/source/map/map.cpp index 7891fa018..e05378eef 100644 --- a/source/map/map.cpp +++ b/source/map/map.cpp @@ -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 } diff --git a/source/player/player.cpp b/source/player/player.cpp index 627142e83..3ba12dcdc 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -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--; } diff --git a/source/player/player.h b/source/player/player.h index 586b5a169..b34e02759 100644 --- a/source/player/player.h +++ b/source/player/player.h @@ -251,6 +251,7 @@ public: void respawn(); + int getLivesLeft() {return m_lives;} public: