This commit is contained in:
Paul 2001-06-11 16:16:04 +00:00
parent f56a1b08a0
commit 534db9d44c
2 changed files with 33 additions and 10 deletions

View file

@ -75,6 +75,10 @@
#include "sound\sound.h" #include "sound\sound.h"
#endif #endif
#ifndef __MAP_MAP_H__
#include "map\map.h"
#endif
#include "gfx\actor.h" #include "gfx\actor.h"
int RenderZ=256; int RenderZ=256;
@ -136,6 +140,9 @@ CGameScene::ACTOR_TYPE CGameScene::actorType[40] =
int s_globalLevelSelectThing=0; int s_globalLevelSelectThing=0;
int CGameScene::s_readyToExit; int CGameScene::s_readyToExit;
int CGameScene::s_levelFinished; int CGameScene::s_levelFinished;
#ifdef __VERSION_DEBUG__
int CGameScene::s_skipToNextLevel;
#endif
int CGameScene::s_restartLevel; int CGameScene::s_restartLevel;
/*****************************************************************************/ /*****************************************************************************/
@ -241,11 +248,20 @@ void CGameScene::think(int _frames)
} }
else if(s_levelFinished) else if(s_levelFinished)
{ {
// Level finished - go to map
GameState::setNextScene(&MapScene);
s_readyToExit=true;
}
#ifdef __VERSION_DEBUG__
else if(s_skipToNextLevel)
{
// Skip to next level
bool Finished=Level.GetNextLevel(s_globalLevelSelectThing); bool Finished=Level.GetNextLevel(s_globalLevelSelectThing);
shutdownLevel(); shutdownLevel();
initLevel(); initLevel();
s_levelFinished=false; s_skipToNextLevel=false;
} }
#endif
else if (s_restartLevel) else if (s_restartLevel)
{ {
if(m_player->getLivesLeft()!=0) if(m_player->getLivesLeft()!=0)
@ -266,24 +282,25 @@ void CGameScene::think(int _frames)
m_pauseMenu->select(); m_pauseMenu->select();
} }
/* if (!s_levelFinished) */CConversation::think(_frames); CConversation::think(_frames);
/* if (!s_levelFinished) */m_pauseMenu->think(_frames); m_pauseMenu->think(_frames);
if(!CConversation::isActive()&& !m_pauseMenu->isActive()) if(!CConversation::isActive()&& !m_pauseMenu->isActive())
{ {
DVECTOR camPos; DVECTOR camPos;
CJellyfishGenerator::think( _frames, &Level ); CJellyfishGenerator::think( _frames, &Level );
/* if (!s_levelFinished) */CThingManager::thinkAllThings(_frames); CThingManager::thinkAllThings(_frames);
/* if (!s_levelFinished) */camPos=m_player->getCameraPos(); camPos=m_player->getCameraPos();
/* if (!s_levelFinished) */CBubicleFactory::setMapOffset(&camPos); CBubicleFactory::setMapOffset(&camPos);
/* if (!s_levelFinished) */Level.setCameraCentre(camPos); Level.setCameraCentre(camPos);
/* if (!s_levelFinished) */Level.think(_frames); Level.think(_frames);
#ifdef __VERSION_DEBUG__
if(PadGetDown(0)&PAD_R2) if(PadGetDown(0)&PAD_R2)
{ {
levelFinished(); s_skipToNextLevel=true;
} }
#endif
} }
// s_levelFinished=false;
} }
@ -340,6 +357,9 @@ void CGameScene::initLevel()
CConversation::registerConversationLevelScripts( s_globalLevelSelectThing ); CConversation::registerConversationLevelScripts( s_globalLevelSelectThing );
s_levelFinished=false; s_levelFinished=false;
#ifdef __VERSION_DEBUG__
s_skipToNextLevel=false;
#endif
Level.init(s_globalLevelSelectThing); Level.init(s_globalLevelSelectThing);
createPlayer(); createPlayer();

View file

@ -72,6 +72,9 @@ static MATRIX CamMtx;
static int s_restartLevel; static int s_restartLevel;
static int s_readyToExit; static int s_readyToExit;
static int s_levelFinished; static int s_levelFinished;
#ifdef __VERSION_DEBUG__
static int s_skipToNextLevel;
#endif
static ACTOR_TYPE actorType[]; static ACTOR_TYPE actorType[];