This commit is contained in:
parent
2798d8f7ba
commit
a866a07974
@ -78,7 +78,7 @@ int s_globalLevelSelectThing=0;
|
|||||||
int s_globalLevelSelectThing=1;
|
int s_globalLevelSelectThing=1;
|
||||||
#endif
|
#endif
|
||||||
int CGameScene::s_readyToExit;
|
int CGameScene::s_readyToExit;
|
||||||
int exitToNextLevel;
|
int CGameScene::s_levelFinished;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -140,7 +140,8 @@ void CGameScene::init()
|
|||||||
SetGeomScreen(GH);
|
SetGeomScreen(GH);
|
||||||
|
|
||||||
s_readyToExit=false;
|
s_readyToExit=false;
|
||||||
exitToNextLevel=false;
|
s_levelFinished=false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -217,7 +218,7 @@ void CGameScene::think(int _frames)
|
|||||||
|
|
||||||
if(PadGetDown(0)&PAD_R2)
|
if(PadGetDown(0)&PAD_R2)
|
||||||
{
|
{
|
||||||
exitToNextLevel=true;
|
levelFinished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ void CGameScene::think(int _frames)
|
|||||||
// Temporarily.. exiting game scene always goes back to the front end (pkg)
|
// Temporarily.. exiting game scene always goes back to the front end (pkg)
|
||||||
GameState::setNextScene(&FrontEndScene);
|
GameState::setNextScene(&FrontEndScene);
|
||||||
}
|
}
|
||||||
else if(exitToNextLevel)
|
else if(s_levelFinished)
|
||||||
{
|
{
|
||||||
s_globalLevelSelectThing++;
|
s_globalLevelSelectThing++;
|
||||||
GameState::setNextScene(&GameScene);
|
GameState::setNextScene(&GameScene);
|
||||||
|
@ -36,6 +36,7 @@ virtual int canPause();
|
|||||||
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
||||||
|
|
||||||
static void setReadyToExit() {s_readyToExit=true;}
|
static void setReadyToExit() {s_readyToExit=true;}
|
||||||
|
static void levelFinished() {s_levelFinished=true;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ protected:
|
|||||||
static MATRIX CamMtx;
|
static MATRIX CamMtx;
|
||||||
|
|
||||||
static int s_readyToExit;
|
static int s_readyToExit;
|
||||||
|
static int s_levelFinished;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -148,6 +148,19 @@ void CThingManager::thinkAllThings(int _frames)
|
|||||||
thing1=thing1->m_nextThing;
|
thing1=thing1->m_nextThing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Player -> Trigger collision
|
||||||
|
thing1=s_thingLists[CThing::TYPE_TRIGGER];
|
||||||
|
thing2=s_thingLists[CThing::TYPE_PLAYER];
|
||||||
|
while(thing1&&thing2)
|
||||||
|
{
|
||||||
|
if(thing1->canCollide()&&
|
||||||
|
thing1->checkCollisionAgainst(thing2))
|
||||||
|
{
|
||||||
|
thing1->collidedWith(thing2);
|
||||||
|
}
|
||||||
|
thing1=thing1->m_nextThing;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user