2000-11-13 20:38:51 +01:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
frontend.h
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2000 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
2000-11-24 01:00:10 +01:00
|
|
|
#ifndef __FRONTEND_FRONTEND_H__
|
|
|
|
#define __FRONTEND_FRONTEND_H__
|
2000-11-13 20:38:51 +01:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
|
|
|
#ifndef __SYSTEM_GSTATE_H__
|
|
|
|
#include "system\gstate.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
2001-04-19 23:11:46 +02:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
FE_OT__LOGO=2,
|
|
|
|
FE_OT__SEAPOS=10,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-11-13 20:38:51 +01:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
|
|
|
class CFrontEndScene : public CScene
|
|
|
|
{
|
|
|
|
public:
|
2000-11-20 16:45:17 +01:00
|
|
|
typedef enum
|
|
|
|
{
|
2001-07-11 20:32:45 +02:00
|
|
|
MODE__NICK_LOGO,
|
2001-04-17 23:40:16 +02:00
|
|
|
MODE__FMV_THQ,
|
|
|
|
MODE__FMV_INTRO,
|
2000-11-20 16:45:17 +01:00
|
|
|
MODE__MAIN_TITLES,
|
|
|
|
MODE__GAME_OPTIONS,
|
|
|
|
MODE__CHOOSE_SLOT,
|
|
|
|
MODE__DEMO,
|
|
|
|
|
|
|
|
MODE__NONE,
|
2000-11-24 21:33:35 +01:00
|
|
|
|
2001-06-22 22:06:39 +02:00
|
|
|
MODE__EXIT_TO_GAME,
|
2000-11-20 16:45:17 +01:00
|
|
|
} FrontEndMode;
|
|
|
|
|
2000-11-28 01:06:22 +01:00
|
|
|
enum
|
|
|
|
{
|
2001-05-16 21:45:36 +02:00
|
|
|
LOGO_CENTRE_Y=72,
|
2001-03-07 16:50:17 +01:00
|
|
|
GAME_TITLE_TEXT_CENTRE_Y=110,
|
2000-11-28 01:06:22 +01:00
|
|
|
GAME_TITLE_TEXT_R=128,
|
|
|
|
GAME_TITLE_TEXT_G=128,
|
|
|
|
GAME_TITLE_TEXT_B=128,
|
|
|
|
};
|
|
|
|
|
2000-11-13 20:38:51 +01:00
|
|
|
void init();
|
|
|
|
void shutdown();
|
|
|
|
void render();
|
|
|
|
void think(int _frames);
|
|
|
|
int readyToShutdown();
|
2000-11-20 18:28:21 +01:00
|
|
|
char *getSceneName() {return"FrontEnd";}
|
2001-07-29 20:39:42 +02:00
|
|
|
|
|
|
|
static void setStartMode(FrontEndMode _mode) {s_startMode=_mode;}
|
2000-11-13 20:38:51 +01:00
|
|
|
|
2000-11-28 01:06:22 +01:00
|
|
|
static void renderLogo();
|
2000-11-13 20:38:51 +01:00
|
|
|
|
|
|
|
private:
|
2000-11-28 01:06:22 +01:00
|
|
|
void thinkLogo(int _frames);
|
|
|
|
|
2000-11-20 16:45:17 +01:00
|
|
|
void setMode(FrontEndMode _newMode);
|
|
|
|
|
2000-11-24 21:33:35 +01:00
|
|
|
int m_exitToGame;
|
|
|
|
|
2000-11-20 16:45:17 +01:00
|
|
|
FrontEndMode m_mode;
|
|
|
|
class CFrontEndMode *m_modeCode;
|
|
|
|
static class CFrontEndMode *s_modeCodes[];
|
|
|
|
|
2001-07-29 20:39:42 +02:00
|
|
|
static FrontEndMode s_startMode;
|
2001-08-17 15:39:44 +02:00
|
|
|
static int s_bootUp;
|
2001-07-29 20:39:42 +02:00
|
|
|
|
2000-11-20 16:45:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CFrontEndMode
|
|
|
|
{
|
|
|
|
public:
|
2001-04-17 23:40:16 +02:00
|
|
|
virtual void init() {;}
|
|
|
|
virtual void shutdown() {;}
|
|
|
|
virtual void select() {;}
|
|
|
|
virtual void unselect() {;}
|
|
|
|
virtual void render() {;}
|
|
|
|
virtual void think(int _frames) {;}
|
2000-11-20 16:45:17 +01:00
|
|
|
|
|
|
|
virtual int isReadyToExit()=0;
|
|
|
|
virtual CFrontEndScene::FrontEndMode getNextMode()=0;
|
|
|
|
|
2000-11-13 20:38:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Globals
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Functions
|
|
|
|
--------- */
|
|
|
|
|
|
|
|
extern CFrontEndScene FrontEndScene;
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- */
|
|
|
|
|
2000-11-24 01:00:10 +01:00
|
|
|
#endif /* __FRONTEND_FRONTEND_H__ */
|
2000-11-13 20:38:51 +01:00
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|