This commit is contained in:
parent
308f06a726
commit
1e0e21be9f
2 changed files with 22 additions and 15 deletions
|
@ -90,6 +90,7 @@ void CNpcFriend::shutdown()
|
||||||
{
|
{
|
||||||
//m_spriteBank->dump(); delete m_spriteBank;
|
//m_spriteBank->dump(); delete m_spriteBank;
|
||||||
|
|
||||||
|
delete m_actorGfx;
|
||||||
CNpcThing::shutdown();
|
CNpcThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +611,9 @@ void CNpcEnemy::shutdown()
|
||||||
|
|
||||||
m_positionHistory = NULL;
|
m_positionHistory = NULL;
|
||||||
|
|
||||||
|
delete m_actorGfx;
|
||||||
CEnemyThing::shutdown();
|
CEnemyThing::shutdown();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -97,7 +97,7 @@ CGameScene GameScene;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::init()
|
void CGameScene::init()
|
||||||
{
|
{
|
||||||
SetIdentNoTrans(&CamMtx);
|
SetIdentNoTrans(&CamMtx);
|
||||||
CamMtx.t[2]=ZPos;
|
CamMtx.t[2]=ZPos;
|
||||||
|
|
||||||
|
@ -115,9 +115,8 @@ void CGameScene::init()
|
||||||
s_readyToExit=false;
|
s_readyToExit=false;
|
||||||
|
|
||||||
CFader::setFadingIn();
|
CFader::setFadingIn();
|
||||||
|
|
||||||
initLevel();
|
initLevel();
|
||||||
CFileIO::EnableASync(true);
|
// CFileIO::EnableASync(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +140,7 @@ int CGameScene::canPause()
|
||||||
|
|
||||||
void CGameScene::shutdown()
|
void CGameScene::shutdown()
|
||||||
{
|
{
|
||||||
CFileIO::EnableASync(false);
|
// CFileIO::EnableASync(false);
|
||||||
shutdownLevel(true);
|
shutdownLevel(true);
|
||||||
CSoundMediator::dumpSong();
|
CSoundMediator::dumpSong();
|
||||||
|
|
||||||
|
@ -170,7 +169,7 @@ void CGameScene::think(int _frames)
|
||||||
// }
|
// }
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
CFileIO::LoadASyncFiles();
|
// CFileIO::LoadASyncFiles();
|
||||||
|
|
||||||
if(s_readyToExit)
|
if(s_readyToExit)
|
||||||
{
|
{
|
||||||
|
@ -182,7 +181,7 @@ void CGameScene::think(int _frames)
|
||||||
s_globalLevelSelectThing=Level.GetNextLevel(s_globalLevelSelectThing);
|
s_globalLevelSelectThing=Level.GetNextLevel(s_globalLevelSelectThing);
|
||||||
shutdownLevel(s_globalLevelSelectThing%12==0);
|
shutdownLevel(s_globalLevelSelectThing%12==0);
|
||||||
initLevel();
|
initLevel();
|
||||||
s_levelFinished=false;
|
s_levelFinished=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,29 +190,30 @@ void CGameScene::think(int _frames)
|
||||||
m_pauseMenu->select();
|
m_pauseMenu->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
CConversation::think(_frames);
|
/* if (!s_levelFinished) */CConversation::think(_frames);
|
||||||
m_pauseMenu->think(_frames);
|
/* if (!s_levelFinished) */m_pauseMenu->think(_frames);
|
||||||
if(!CConversation::isActive()&&
|
if(!CConversation::isActive()&& !m_pauseMenu->isActive())
|
||||||
!m_pauseMenu->isActive())
|
|
||||||
{
|
{
|
||||||
DVECTOR camPos;
|
DVECTOR camPos;
|
||||||
CThingManager::thinkAllThings(_frames);
|
/* if (!s_levelFinished) */CThingManager::thinkAllThings(_frames);
|
||||||
camPos=m_player->getCameraPos();
|
/* if (!s_levelFinished) */camPos=m_player->getCameraPos();
|
||||||
//PKG
|
//PKG
|
||||||
// if(camPos.vx<0){camPos.vx=0;PAUL_DBGMSG("cx<0");}
|
// if(camPos.vx<0){camPos.vx=0;PAUL_DBGMSG("cx<0");}
|
||||||
// if(camPos.vy<0){camPos.vy=0;PAUL_DBGMSG("cy<0");}
|
// if(camPos.vy<0){camPos.vy=0;PAUL_DBGMSG("cy<0");}
|
||||||
//PKG
|
//PKG
|
||||||
CBubicleFactory::setMapOffset(&camPos);
|
/* if (!s_levelFinished) */CBubicleFactory::setMapOffset(&camPos);
|
||||||
Level.setCameraCentre(camPos);
|
/* if (!s_levelFinished) */Level.setCameraCentre(camPos);
|
||||||
Level.think(_frames);
|
/* if (!s_levelFinished) */Level.think(_frames);
|
||||||
|
|
||||||
if(PadGetDown(0)&PAD_R2)
|
if(PadGetDown(0)&PAD_R2)
|
||||||
{
|
{
|
||||||
levelFinished();
|
levelFinished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// s_levelFinished=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int CGameScene::readyToShutdown()
|
int CGameScene::readyToShutdown()
|
||||||
{
|
{
|
||||||
|
@ -237,6 +237,7 @@ void CGameScene::sendEvent( GAME_EVENT evt, CThing *sourceThing )
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::initLevel()
|
void CGameScene::initLevel()
|
||||||
{
|
{
|
||||||
|
printf("InitLevel\n");
|
||||||
CThingManager::init();
|
CThingManager::init();
|
||||||
|
|
||||||
CConversation::init();
|
CConversation::init();
|
||||||
|
@ -375,12 +376,15 @@ void CGameScene::initLevel()
|
||||||
platform->addWaypoint( newXPos, newYPos );
|
platform->addWaypoint( newXPos, newYPos );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Song is loaded/dumped by the level, and played from here. This just gives some
|
// Song is loaded/dumped by the level, and played from here. This just gives some
|
||||||
// better timing over when it starts (pkg)
|
// better timing over when it starts (pkg)
|
||||||
CSoundMediator::playSong();
|
CSoundMediator::playSong();
|
||||||
|
printf("InitLevelDone\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue