This commit is contained in:
parent
27ac4b9945
commit
faa0ddf7cb
4 changed files with 53 additions and 7 deletions
|
@ -48,6 +48,9 @@ CD_FILESYS_LIB := CMXBoot
|
|||
# Source Code to Compile
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
backend_src := gameover \
|
||||
complete
|
||||
|
||||
enemy_src :=
|
||||
|
||||
fileio_src := fileio \
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
Purpose: Game Over scene. Shown when out of contiunes or player chooses
|
||||
not to continue any longer
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
|
@ -83,6 +84,7 @@ void CGameOverScene::init()
|
|||
m_font->setOt(10);
|
||||
|
||||
m_readyToExit=false;
|
||||
CFader::setFadingIn(CFader::BLACK_FADE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,12 +128,12 @@ void CGameOverScene::render()
|
|||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::think(int _frames)
|
||||
{
|
||||
if(!m_readyToExit)
|
||||
if(!CFader::isFading()&&!m_readyToExit)
|
||||
{
|
||||
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
||||
{
|
||||
m_readyToExit=true;
|
||||
CFader::setFadingOut();
|
||||
CFader::setFadingOut(CFader::BLACK_FADE);
|
||||
GameState::setNextScene(&FrontEndScene);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,14 @@
|
|||
#include "game\game.h"
|
||||
#endif
|
||||
|
||||
#ifndef __BACKEND_GAMEOVER_H__
|
||||
#include "backend\gameover.h"
|
||||
#endif
|
||||
|
||||
#ifndef __BACKEND_COMPLETE_H__
|
||||
#include "backend\complete.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
@ -70,6 +78,8 @@ CScene *CSceneSelector::s_sceneList[]=
|
|||
{
|
||||
&GameScene, // First scene in the list is the default scene
|
||||
&FrontEndScene,
|
||||
&GameOverScene,
|
||||
&GameCompletedScene,
|
||||
};
|
||||
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
||||
|
||||
|
@ -119,6 +129,7 @@ void CSceneSelector::render()
|
|||
if(m_state==STATE_SELECTING)
|
||||
{
|
||||
POLY_F4 *f4;
|
||||
int i;
|
||||
|
||||
f4=GetPrimF4();
|
||||
setXYWH(f4,0,0,512,256);
|
||||
|
@ -126,9 +137,19 @@ void CSceneSelector::render()
|
|||
AddPrimToList(f4,20);
|
||||
|
||||
m_font->setColour(255,255,255);
|
||||
m_font->print(256,100,"Select scene:");
|
||||
m_font->print(256,80,"Select scene:");
|
||||
for(i=0;i<s_sceneCount;i++)
|
||||
{
|
||||
if(i==m_currentSelection)
|
||||
{
|
||||
m_font->setColour(100,255,100);
|
||||
m_font->print(256,120,s_sceneList[m_currentSelection]->getSceneName());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_font->setColour(255,100,100);
|
||||
}
|
||||
m_font->print(256,110+(i*m_font->getCharHeight()),s_sceneList[i]->getSceneName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,26 @@ CFG=spongebob project - Win32 Debug
|
|||
# Begin Group "source"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "backend"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\complete.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\complete.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\gameover.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\gameover.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "enemy"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
|
|
Loading…
Add table
Reference in a new issue