This commit is contained in:
Paul 2001-08-04 19:16:11 +00:00
parent 8c23d3721e
commit b55079c261
4 changed files with 48 additions and 2 deletions

View File

@ -266,6 +266,8 @@ void CGameScene::render()
break; break;
case GAMESTATE_PLAYING: case GAMESTATE_PLAYING:
case GAMESTATE_FADING_INTO_BOSS_INTRO: case GAMESTATE_FADING_INTO_BOSS_INTRO:
case GAMESTATE_TELEPORT_START:
case GAMESTATE_TELEPORT_END:
render_playing(); render_playing();
break; break;
case GAMESTATE_BOSS_INTRO: case GAMESTATE_BOSS_INTRO:
@ -367,6 +369,11 @@ void CGameScene::render_playing()
/*****************************************************************************/ /*****************************************************************************/
void CGameScene::think(int _frames) void CGameScene::think(int _frames)
{ {
//#if defined (__USER_paul__)
//if(PadGetDown(0)&PAD_UP)
//{
//}
//#endif
if(!m_musicStarted&&!CFader::isFading()) if(!m_musicStarted&&!CFader::isFading())
{ {
// 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
@ -402,6 +409,22 @@ void CGameScene::think(int _frames)
CFader::setFadingIn(); CFader::setFadingIn();
} }
break; break;
case GAMESTATE_TELEPORT_START:
if(!CFader::isFading())
{
think_playing(1); // Let the teleport happen..
think_playing(1);
think_playing(1);
m_gamestate=GAMESTATE_TELEPORT_END;
CFader::setFadingIn(CFader::WHITE_FADE);
}
break;
case GAMESTATE_TELEPORT_END:
if(!CFader::isFading())
{
m_gamestate=GAMESTATE_PLAYING;
}
break;
} }
@ -653,6 +676,20 @@ int CGameScene::getTotalSpatCountForThisLevel()
return Level.getTotalSpatCount(); return Level.getTotalSpatCount();
} }
/*****************************************************************************/
int CGameScene::triggerTeleportEffect()
{
if(m_gamestate==GAMESTATE_PLAYING)
{
m_gamestate=GAMESTATE_TELEPORT_START;
CFader::setFadingOut(CFader::WHITE_FADE);
return true;
}
return false;
}
/*****************************************************************************/ /*****************************************************************************/
void CGameScene::respawnLevel() void CGameScene::respawnLevel()
{ {

View File

@ -59,6 +59,8 @@ static void levelFinished() {s_levelFinished=true;}
static void restartlevel() {s_restartLevel=true;} static void restartlevel() {s_restartLevel=true;}
CLevel &GetLevel() {return(Level);} CLevel &GetLevel() {return(Level);}
int triggerTeleportEffect();
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];} static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
@ -80,6 +82,8 @@ private:
GAMESTATE_PLAYING, GAMESTATE_PLAYING,
GAMESTATE_FADING_INTO_BOSS_INTRO, GAMESTATE_FADING_INTO_BOSS_INTRO,
GAMESTATE_BOSS_INTRO, GAMESTATE_BOSS_INTRO,
GAMESTATE_TELEPORT_START,
GAMESTATE_TELEPORT_END,
}GAMESTATE; }GAMESTATE;
enum enum

View File

@ -150,8 +150,10 @@
Tyepdefs && Defines Tyepdefs && Defines
------------------- */ ------------------- */
#ifdef __VERSION_DEBUG__
//#define _RECORD_DEMO_MODE_ //#define _RECORD_DEMO_MODE_
#define _STATE_DEBUG_ #define _STATE_DEBUG_
#endif
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------

View File

@ -84,8 +84,11 @@ void CTeleportTrigger::collidedWith(CThing *_thisThing)
} }
} }
((CPlayer*)_thisThing)->clearPlatform(); if(GameScene.triggerTeleportEffect())
((CPlayer*)_thisThing)->teleportTo(m_boxX1+8,m_boxY1+16); {
((CPlayer*)_thisThing)->clearPlatform();
((CPlayer*)_thisThing)->teleportTo(m_boxX1+8,m_boxY1+16);
}
break; break;
} }