This commit is contained in:
parent
d0c3c5dad1
commit
61a94e2065
11 changed files with 112 additions and 2 deletions
Binary file not shown.
Binary file not shown.
|
@ -310,6 +310,7 @@ system_src := main \
|
||||||
thing_src := thing
|
thing_src := thing
|
||||||
|
|
||||||
triggers_src := trigger \
|
triggers_src := trigger \
|
||||||
|
tboss \
|
||||||
tcamlock \
|
tcamlock \
|
||||||
tlevexit \
|
tlevexit \
|
||||||
tlook \
|
tlook \
|
||||||
|
|
|
@ -164,6 +164,7 @@ int CGameScene::s_skipToNextLevel;
|
||||||
#endif
|
#endif
|
||||||
int CGameScene::s_restartLevel;
|
int CGameScene::s_restartLevel;
|
||||||
int CGameScene::s_bossHasBeenKilled;
|
int CGameScene::s_bossHasBeenKilled;
|
||||||
|
int CGameScene::s_justHitBossArenaTrigger;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
@ -242,8 +243,13 @@ void CGameScene::render()
|
||||||
render_showing_lives();
|
render_showing_lives();
|
||||||
break;
|
break;
|
||||||
case GAMESTATE_PLAYING:
|
case GAMESTATE_PLAYING:
|
||||||
|
case GAMESTATE_FADING_INTO_BOSS_INTRO:
|
||||||
render_playing();
|
render_playing();
|
||||||
break;
|
break;
|
||||||
|
case GAMESTATE_BOSS_INTRO:
|
||||||
|
case GAMESTATE_FADING_OUT_OF_BOSS_INTRO:
|
||||||
|
render_boss_intro();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,6 +335,34 @@ void CGameScene::render_playing()
|
||||||
CActorPool::CleanUpCache();
|
CActorPool::CleanUpCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CGameScene::render_boss_intro()
|
||||||
|
{
|
||||||
|
POLY_G4 *g4;
|
||||||
|
|
||||||
|
// Black background
|
||||||
|
g4=GetPrimG4();
|
||||||
|
setXYWH(g4,0,0,512,256);
|
||||||
|
setRGB0(g4,70,50,60);
|
||||||
|
setRGB1(g4,70,50,60);
|
||||||
|
setRGB2(g4,50,60,70);
|
||||||
|
setRGB3(g4,50,60,70);
|
||||||
|
AddPrimToList(g4,5);
|
||||||
|
|
||||||
|
// Instructions..
|
||||||
|
m_scalableFont->setColour(255,255,255);
|
||||||
|
m_scalableFont->setTrans(0);
|
||||||
|
m_scalableFont->setSMode(0);
|
||||||
|
m_scalableFont->setScale(300);
|
||||||
|
m_scalableFont->setJustification(FontBank::JUST_CENTRE);
|
||||||
|
m_scalableFont->print(256,30,"HOW TO BEAT THE BOSS...");
|
||||||
|
|
||||||
|
s_genericFont->setColour(255,255,255);
|
||||||
|
s_genericFont->setTrans(0);
|
||||||
|
s_genericFont->setSMode(0);
|
||||||
|
s_genericFont->print(256,70,"Blah\nBlah\nBlah");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::think(int _frames)
|
void CGameScene::think(int _frames)
|
||||||
{
|
{
|
||||||
|
@ -340,6 +374,23 @@ void CGameScene::think(int _frames)
|
||||||
case GAMESTATE_PLAYING:
|
case GAMESTATE_PLAYING:
|
||||||
think_playing(_frames);
|
think_playing(_frames);
|
||||||
break;
|
break;
|
||||||
|
case GAMESTATE_FADING_INTO_BOSS_INTRO:
|
||||||
|
if(!CFader::isFading())
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_BOSS_INTRO;
|
||||||
|
CFader::setFadingIn();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GAMESTATE_BOSS_INTRO:
|
||||||
|
think_boss_intro(_frames);
|
||||||
|
break;
|
||||||
|
case GAMESTATE_FADING_OUT_OF_BOSS_INTRO:
|
||||||
|
if(!CFader::isFading())
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_PLAYING;
|
||||||
|
CFader::setFadingIn();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,6 +432,14 @@ void CGameScene::think_playing(int _frames)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(s_justHitBossArenaTrigger)
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_FADING_INTO_BOSS_INTRO;
|
||||||
|
CFader::setFadingOut();
|
||||||
|
s_justHitBossArenaTrigger=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Auto-timer stuff
|
// Auto-timer stuff
|
||||||
if(m_levelHasTimer)
|
if(m_levelHasTimer)
|
||||||
{
|
{
|
||||||
|
@ -512,6 +571,18 @@ void CGameScene::think_playing(int _frames)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CGameScene::think_boss_intro(int _frames)
|
||||||
|
{
|
||||||
|
if(PadGetDown(0)&PAD_CROSS)
|
||||||
|
{
|
||||||
|
m_gamestate=GAMESTATE_FADING_OUT_OF_BOSS_INTRO;
|
||||||
|
CFader::setFadingOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int CGameScene::readyToShutdown()
|
int CGameScene::readyToShutdown()
|
||||||
{
|
{
|
||||||
|
@ -564,6 +635,11 @@ void CGameScene::setReadyToExit()
|
||||||
CFader::setFadingOut();
|
CFader::setFadingOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CGameScene::hitBossArenaTrigger()
|
||||||
|
{
|
||||||
|
s_justHitBossArenaTrigger=true;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::initLevel()
|
void CGameScene::initLevel()
|
||||||
|
@ -592,6 +668,7 @@ void CGameScene::initLevel()
|
||||||
m_player->setCameraBox(camBox);
|
m_player->setCameraBox(camBox);
|
||||||
|
|
||||||
s_bossHasBeenKilled=false;
|
s_bossHasBeenKilled=false;
|
||||||
|
s_justHitBossArenaTrigger=false;
|
||||||
|
|
||||||
if(getLevelNumber()==5&&getChapterNumber()==2)
|
if(getLevelNumber()==5&&getChapterNumber()==2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,10 +50,14 @@ virtual int canPause();
|
||||||
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
||||||
|
|
||||||
static void setReadyToExit();
|
static void setReadyToExit();
|
||||||
|
static void hitBossArenaTrigger();
|
||||||
|
|
||||||
static void levelFinished() {s_levelFinished=true;}
|
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);}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// static MATRIX &GetCamMtx() {return(CamMtx);}
|
// static MATRIX &GetCamMtx() {return(CamMtx);}
|
||||||
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
|
static ACTOR_TYPE getActorType( int actorNum ) {return actorType[actorNum];}
|
||||||
|
|
||||||
|
@ -68,6 +72,9 @@ private:
|
||||||
{
|
{
|
||||||
GAMESTATE_SHOWING_LIVES,
|
GAMESTATE_SHOWING_LIVES,
|
||||||
GAMESTATE_PLAYING,
|
GAMESTATE_PLAYING,
|
||||||
|
GAMESTATE_FADING_INTO_BOSS_INTRO,
|
||||||
|
GAMESTATE_BOSS_INTRO,
|
||||||
|
GAMESTATE_FADING_OUT_OF_BOSS_INTRO,
|
||||||
}GAMESTATE;
|
}GAMESTATE;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -78,11 +85,14 @@ private:
|
||||||
|
|
||||||
GAMESTATE m_gamestate;
|
GAMESTATE m_gamestate;
|
||||||
int m_showingLivesTimer;
|
int m_showingLivesTimer;
|
||||||
|
static int s_justHitBossArenaTrigger;
|
||||||
|
|
||||||
void think_showing_lives(int _frames);
|
void think_showing_lives(int _frames);
|
||||||
void think_playing(int _frames);
|
void think_playing(int _frames);
|
||||||
|
void think_boss_intro(int _frames);
|
||||||
void render_showing_lives();
|
void render_showing_lives();
|
||||||
void render_playing();
|
void render_playing();
|
||||||
|
void render_boss_intro();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -58,6 +58,9 @@ void CBossArenaTrigger::collidedWith(CThing *_thisThing)
|
||||||
{
|
{
|
||||||
case TYPE_PLAYER:
|
case TYPE_PLAYER:
|
||||||
{
|
{
|
||||||
|
CGameScene::hitBossArenaTrigger();
|
||||||
|
shutdown();
|
||||||
|
delete this;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,10 @@
|
||||||
#include "triggers\toilgeyser.h"
|
#include "triggers\toilgeyser.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TBOSS_H__
|
||||||
|
#include "triggers\tboss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GAME_GAME_H__
|
#ifndef __GAME_GAME_H__
|
||||||
#include "game\game.h"
|
#include "game\game.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -334,7 +338,10 @@ CTrigger *trigger;
|
||||||
case TRIGGER_OIL_GEYSER:
|
case TRIGGER_OIL_GEYSER:
|
||||||
trigger = (COilGeyserTrigger*)new("OilGeyserTrigger") COilGeyserTrigger();
|
trigger = (COilGeyserTrigger*)new("OilGeyserTrigger") COilGeyserTrigger();
|
||||||
break;
|
break;
|
||||||
|
// Boss Arena
|
||||||
|
case TRIGGER_BOSS_ARENA:
|
||||||
|
trigger = (COilGeyserTrigger*)new("BossArenaTrigger") CBossArenaTrigger();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
trigger=NULL;
|
trigger=NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ enum TRIGGER_TYPE
|
||||||
TRIGGER_WIND_LEFT,
|
TRIGGER_WIND_LEFT,
|
||||||
TRIGGER_WIND_RIGHT,
|
TRIGGER_WIND_RIGHT,
|
||||||
TRIGGER_OIL_GEYSER,
|
TRIGGER_OIL_GEYSER,
|
||||||
|
TRIGGER_BOSS_ARENA,
|
||||||
|
|
||||||
// Code based triggers
|
// Code based triggers
|
||||||
TRIGGER_PLATFORM,
|
TRIGGER_PLATFORM,
|
||||||
|
|
|
@ -162,6 +162,7 @@ WindDown=29
|
||||||
WindLeft=30
|
WindLeft=30
|
||||||
WindRight=31
|
WindRight=31
|
||||||
OilGeyser=32
|
OilGeyser=32
|
||||||
|
BossArena=33
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# FX
|
# FX
|
||||||
|
|
|
@ -72,3 +72,5 @@ HasBox=1
|
||||||
[WindRight]
|
[WindRight]
|
||||||
|
|
||||||
[OilGeyser]
|
[OilGeyser]
|
||||||
|
|
||||||
|
[BossArena]
|
||||||
|
|
|
@ -2205,6 +2205,14 @@ SOURCE=..\..\..\source\triggers\tbgeyser.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\triggers\tboss.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\triggers\tboss.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\triggers\tcamlock.cpp
|
SOURCE=..\..\..\source\triggers\tcamlock.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Reference in a new issue