This commit is contained in:
parent
82b627ce56
commit
63c3ca5ca1
5 changed files with 119 additions and 14 deletions
|
@ -181,6 +181,8 @@ frontend_src := credits \
|
||||||
scrollbg \
|
scrollbg \
|
||||||
start
|
start
|
||||||
|
|
||||||
|
fma_src := fma
|
||||||
|
|
||||||
fmv_src := fmv
|
fmv_src := fmv
|
||||||
|
|
||||||
game_src := convo \
|
game_src := convo \
|
||||||
|
|
|
@ -18,6 +18,22 @@
|
||||||
|
|
||||||
#include "fma\fma.h"
|
#include "fma\fma.h"
|
||||||
|
|
||||||
|
#ifndef __LEVEL_LEVEL_H__
|
||||||
|
#include "level\level.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing\thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_CONVO_H__
|
||||||
|
#include "game\convo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MAP_MAP_H__
|
||||||
|
#include "map\map.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -44,6 +60,16 @@
|
||||||
CFmaScene FmaScene;
|
CFmaScene FmaScene;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// tmp
|
||||||
|
#include "pad\pads.h"
|
||||||
|
// tmp
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
@ -52,6 +78,16 @@ CFmaScene FmaScene;
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFmaScene::init()
|
void CFmaScene::init()
|
||||||
{
|
{
|
||||||
|
CThingManager::init();
|
||||||
|
CConversation::init();
|
||||||
|
|
||||||
|
CConversation::registerConversationScript(SCRIPTS_CH1L1_01_DAT);
|
||||||
|
|
||||||
|
m_level=new ("FMALevel") CLevel();
|
||||||
|
m_level->init(25);
|
||||||
|
|
||||||
|
m_cameraPos.vx=m_cameraPos.vy=0;
|
||||||
|
m_readyToShutdown=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,6 +99,10 @@ void CFmaScene::init()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFmaScene::shutdown()
|
void CFmaScene::shutdown()
|
||||||
{
|
{
|
||||||
|
m_level->shutdown(); delete m_level;
|
||||||
|
|
||||||
|
CConversation::shutdown();
|
||||||
|
CThingManager::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,6 +114,9 @@ void CFmaScene::shutdown()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFmaScene::render()
|
void CFmaScene::render()
|
||||||
{
|
{
|
||||||
|
CThingManager::renderAllThings();
|
||||||
|
CConversation::render();
|
||||||
|
m_level->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,6 +128,33 @@ void CFmaScene::render()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFmaScene::think(int _frames)
|
void CFmaScene::think(int _frames)
|
||||||
{
|
{
|
||||||
|
// tmp
|
||||||
|
if(PadGetHeld(0)&PAD_UP)
|
||||||
|
{
|
||||||
|
m_cameraPos.vy-=10*_frames;
|
||||||
|
}
|
||||||
|
else if(PadGetHeld(0)&PAD_DOWN)
|
||||||
|
{
|
||||||
|
m_cameraPos.vy+=10*_frames;
|
||||||
|
}
|
||||||
|
else if(PadGetHeld(0)&PAD_LEFT)
|
||||||
|
{
|
||||||
|
m_cameraPos.vx-=10*_frames;
|
||||||
|
}
|
||||||
|
else if(PadGetHeld(0)&PAD_RIGHT)
|
||||||
|
{
|
||||||
|
m_cameraPos.vx+=10*_frames;
|
||||||
|
}
|
||||||
|
else if(PadGetDown(0)&PAD_START)
|
||||||
|
{
|
||||||
|
startShutdown();
|
||||||
|
}
|
||||||
|
// tmp
|
||||||
|
|
||||||
|
CThingManager::thinkAllThings(_frames);
|
||||||
|
CConversation::think(_frames);
|
||||||
|
m_level->setCameraCentre(m_cameraPos);
|
||||||
|
m_level->think(_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +166,20 @@ void CFmaScene::think(int _frames)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int CFmaScene::readyToShutdown()
|
int CFmaScene::readyToShutdown()
|
||||||
{
|
{
|
||||||
return false;
|
return m_readyToShutdown;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CFmaScene::startShutdown()
|
||||||
|
{
|
||||||
|
GameState::setNextScene(&MapScene);
|
||||||
|
m_readyToShutdown=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
#include "system\gstate.h"
|
#include "system\gstate.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GLOBAL_HEADER_
|
||||||
|
#include "system\global.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -44,6 +48,17 @@ public:
|
||||||
int readyToShutdown();
|
int readyToShutdown();
|
||||||
char *getSceneName() {return"FMA";}
|
char *getSceneName() {return"FMA";}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void startShutdown();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class CLevel *m_level;
|
||||||
|
|
||||||
|
DVECTOR m_cameraPos;
|
||||||
|
|
||||||
|
int m_readyToShutdown;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -162,19 +162,19 @@
|
||||||
{5,4, CHAPTER05_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL04_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL4, STR__CHAPTER_5,STR__CHAPTER_5_LEVEL_4 },
|
{5,4, CHAPTER05_LEVEL04_INF_TOTAL_ITEM_GOLDEN_SPATULA, LEVELS_CHAPTER05_LEVEL04_LVL,LEVELS_CHAPTER05_LEVEL04_TEX, CSoundMediator::SONG_CHAPTER5_LEVEL4, STR__CHAPTER_5,STR__CHAPTER_5_LEVEL_4 },
|
||||||
{5,5, CHAPTER06_LEVEL05_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL05_LVL,LEVELS_CHAPTER06_LEVEL05_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE, STR__KELP_WORLD,STR__CHAPTER_6_LEVEL_5 },
|
{5,5, CHAPTER06_LEVEL05_INF_TOTAL_ITEM_KELP_TOKEN, LEVELS_CHAPTER06_LEVEL05_LVL,LEVELS_CHAPTER06_LEVEL05_TEX, CSoundMediator::SONG_CHAPTER6_TUNNELOFLOVE, STR__KELP_WORLD,STR__CHAPTER_6_LEVEL_5 },
|
||||||
// FMA
|
// FMA
|
||||||
{6,99, 0, LEVELS_FMA_SHADYSHOALS_LVL,LEVELS_FMA_SHADYSHOALS_TEX, CSoundMediator::SONG_TITLE},
|
{6,0, 0, LEVELS_FMA_SHADYSHOALS_LVL,LEVELS_FMA_SHADYSHOALS_TEX, CSoundMediator::SONG_TITLE, STR__NOW_LOADING,STR__NOW_LOADING },
|
||||||
|
|
||||||
};
|
};
|
||||||
const int LvlTableSize=sizeof(LvlTable)/sizeof(sLvlTab);
|
const int LvlTableSize=sizeof(LvlTable)/sizeof(sLvlTab);
|
||||||
|
|
||||||
const FileEquate loadingScreens[6]=
|
const FileEquate loadingScreens[7]=
|
||||||
{
|
{
|
||||||
LOADINGSCREENS_PINEAPPLE_GFX,
|
LOADINGSCREENS_PINEAPPLE_GFX, // Chapter 1
|
||||||
LOADINGSCREENS_CULTURE_GFX,
|
LOADINGSCREENS_CULTURE_GFX, // Chapter 2
|
||||||
LOADINGSCREENS_PICKLES_GFX,
|
LOADINGSCREENS_PICKLES_GFX, // Chapter 3
|
||||||
LOADINGSCREENS_MONITOR_GFX,
|
LOADINGSCREENS_MONITOR_GFX, // Chapter 4
|
||||||
LOADINGSCREENS_KARATE_GFX,
|
LOADINGSCREENS_KARATE_GFX, // Chapter 5
|
||||||
LOADINGSCREENS_PIZZA_GFX,
|
LOADINGSCREENS_PIZZA_GFX, // Fma
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
#include "game\game.h"
|
#include "game\game.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __FMA_FMA_H__
|
||||||
|
#include "fma\fma.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __BACKEND_GAMEOVER_H__
|
#ifndef __BACKEND_GAMEOVER_H__
|
||||||
#include "backend\gameover.h"
|
#include "backend\gameover.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -88,6 +92,7 @@ CScene *CSceneSelector::s_sceneList[]=
|
||||||
&FrontEndScene,
|
&FrontEndScene,
|
||||||
&GameOverScene,
|
&GameOverScene,
|
||||||
&GameCompletedScene,
|
&GameCompletedScene,
|
||||||
|
&FmaScene,
|
||||||
&MapScene,
|
&MapScene,
|
||||||
};
|
};
|
||||||
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
||||||
|
|
Loading…
Add table
Reference in a new issue