-
Notifications
You must be signed in to change notification settings - Fork 1
/
State.h
executable file
·54 lines (41 loc) · 1.09 KB
/
State.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//****************************************************************************
//
// File: State.h
// Programmer: T.J. Eason
// Project: Game Engine
// Description: Game derive states from the class to add to the engine.
// Date: 1-25-10
// Revision 1: 3-25-10
// Revision 2: 4-2-10
// References: Cube Engine Manual
//
// ****************************************************************************
#ifndef STATE_H
#define STATE_H
// Viewer setup structure
struct ViewerSetup
{
SceneObject *viewer; // Current object being viewed
unsigned long viewClearFlags; // Flags used for clearing the view.
// The viewer setup structure constructor.
ViewerSetup()
{
viewer = NULL;
viewClearFlags = 0;
};
};
// State class
class State
{
public:
State( unsigned long id = 0 );
virtual void Load();
virtual void Close();
virtual void RequestViewer( ViewerSetup *viewer );
virtual void Update( float elapsed );
virtual void Render();
unsigned long GetID();
private:
unsigned long m_id; // Distinct game id for state switching
};
#endif