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
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
|
|
|
class CFrontEndScene : public CScene
|
|
|
|
{
|
|
|
|
public:
|
2000-11-20 16:45:17 +01:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MODE__MAIN_TITLES,
|
|
|
|
MODE__GAME_OPTIONS,
|
|
|
|
MODE__CHOOSE_SLOT,
|
|
|
|
MODE__DEMO,
|
2000-11-24 18:30:49 +01:00
|
|
|
MODE__CREDITS,
|
2000-11-20 16:45:17 +01:00
|
|
|
|
|
|
|
MODE__NONE,
|
2000-11-24 21:33:35 +01:00
|
|
|
|
|
|
|
MODE__EXIT_TO_GAME,
|
2000-11-20 16:45:17 +01:00
|
|
|
} FrontEndMode;
|
|
|
|
|
2000-11-28 01:06:22 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
LOGO_CENTRE_Y=74,
|
|
|
|
GAME_TITLE_TEXT_CENTRE_Y=100,
|
|
|
|
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";}
|
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[];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CFrontEndMode
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void init()=0;
|
|
|
|
virtual void shutdown()=0;
|
2000-11-22 18:02:04 +01:00
|
|
|
virtual void select()=0;
|
|
|
|
virtual void unselect()=0;
|
2000-11-20 16:45:17 +01:00
|
|
|
virtual void render()=0;
|
|
|
|
virtual void think(int _frames)=0;
|
|
|
|
|
|
|
|
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 */
|