This commit is contained in:
parent
1a606c048d
commit
d18e92c6ae
10 changed files with 194 additions and 33 deletions
|
@ -296,6 +296,21 @@ CPlayer * CGameScene::getPlayer()
|
|||
return( m_player );
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int CGameScene::getChapterNumber()
|
||||
{
|
||||
return Level.getCurrentChapter();
|
||||
}
|
||||
int CGameScene::getLevelNumber()
|
||||
{
|
||||
return Level.getCurrentChapterLevel();
|
||||
}
|
||||
|
||||
int CGameScene::getTotalSpatCountForThisLevel()
|
||||
{
|
||||
return Level.getTotalSpatCount();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CGameScene::respawnLevel()
|
||||
{
|
||||
|
|
|
@ -39,6 +39,10 @@ virtual int canPause();
|
|||
int readyToShutdown();
|
||||
char *getSceneName() {return "Game";}
|
||||
|
||||
int getChapterNumber();
|
||||
int getLevelNumber();
|
||||
int getTotalSpatCountForThisLevel();
|
||||
|
||||
CPlayer *getPlayer();
|
||||
void respawnLevel();
|
||||
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
||||
|
@ -46,7 +50,8 @@ virtual int canPause();
|
|||
static void setReadyToExit() {s_readyToExit=true;}
|
||||
static void levelFinished() {s_levelFinished=true;}
|
||||
static void restartlevel() {s_restartLevel=true;}
|
||||
|
||||
|
||||
|
||||
// static MATRIX &GetCamMtx() {return(CamMtx);}
|
||||
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
|
||||
|
||||
|
|
|
@ -34,6 +34,14 @@
|
|||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAME_H__
|
||||
#include "game\game.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAMESLOT_H__
|
||||
#include "game\gameslot.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
@ -149,7 +157,7 @@ void CPauseMenu::init()
|
|||
&newmode,PLAYER_MODE_DEAD);
|
||||
xpos+=TEXT_SPACING;
|
||||
#else
|
||||
xpos+=TEXT_SPACING*2;
|
||||
xpos+=TEXT_SPACING*4;
|
||||
CGUIFactory::createValueButtonFrame(m_guiFrame,
|
||||
(FRAME_WIDTH-TEXT_BOX_WIDTH)/2,xpos,TEXT_BOX_WIDTH,TEXT_BOX_HEIGHT,
|
||||
STR__PAUSE_MENU__CONTINUE,
|
||||
|
@ -169,6 +177,10 @@ void CPauseMenu::init()
|
|||
xpos+=TEXT_SPACING*2;
|
||||
#endif
|
||||
|
||||
m_guiSpatReadout=new ("SpatReadout") CGUISpatCountReadout();
|
||||
m_guiSpatReadout->init(m_guiFrame);
|
||||
m_guiSpatReadout->setObjectXYWH(10,10,120,40);
|
||||
|
||||
m_active=false;
|
||||
}
|
||||
|
||||
|
@ -193,10 +205,16 @@ void CPauseMenu::shutdown()
|
|||
---------------------------------------------------------------------- */
|
||||
void CPauseMenu::select()
|
||||
{
|
||||
int chapter,level;
|
||||
m_active=true;
|
||||
m_exitPauseMenuFlag=false;
|
||||
m_quitGameFlag=false;
|
||||
m_guiFrame->select();
|
||||
|
||||
chapter=GameScene.getChapterNumber();
|
||||
level=GameScene.getLevelNumber();
|
||||
m_guiSpatReadout->setSpatCounts(CGameSlotManager::getSlotData()->getSpatulaCollectedCount(chapter,level),
|
||||
GameScene.getTotalSpatCountForThisLevel());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ private:
|
|||
int m_exitPauseMenuFlag;
|
||||
int m_quitGameFlag;
|
||||
|
||||
class CGUIControlFrame *m_guiFrame;
|
||||
class CGUIControlFrame *m_guiFrame;
|
||||
class CGUISpatCountReadout *m_guiSpatReadout;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue