This commit is contained in:
parent
e9f123dec7
commit
74ac11a27f
40 changed files with 6829 additions and 0 deletions
69
source/system/gstate.h
Normal file
69
source/system/gstate.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*=========================================================================
|
||||
|
||||
gstate.h
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: PRLSR
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2000 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __SYSTEM_GSTATE_H__
|
||||
#define __SYSTEM_GSTATE_H__
|
||||
|
||||
class CScene
|
||||
{
|
||||
public:
|
||||
CScene() {}
|
||||
virtual ~CScene() {}
|
||||
|
||||
virtual void Init()=0;
|
||||
virtual void Shutdown()=0;
|
||||
virtual void Render()=0;
|
||||
virtual bool Control()=0;
|
||||
virtual char *GetSceneName()=0;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
class GameState
|
||||
{
|
||||
public:
|
||||
static void initialise();
|
||||
static void think();
|
||||
static void render();
|
||||
|
||||
static void setNextScene( CScene *_nextScene );
|
||||
|
||||
inline static u32 getTimeSinceLast() {return s_timeSinceLast;}
|
||||
inline static u32 getFramesSinceLast() {return (s_timeSinceLast>>12)+1;}
|
||||
|
||||
static void setTimeSpeed( int speed );
|
||||
|
||||
static CScene * getCurrentScene();
|
||||
|
||||
#if defined(__TERRITORY_USA__) || defined(__TERRITORY_JAP__)
|
||||
static int getOneSecondInFrames() {return 60;}
|
||||
#else
|
||||
static int getOneSecondInFrames() {return 50;}
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Try and instantiate a GameState and you will fail miserably :)
|
||||
GameState();
|
||||
|
||||
static void updateTimer();
|
||||
static int s_timeSinceLast;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* __SYSTEM_GSTATE_H__ */
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue