-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseMenuState.h
89 lines (79 loc) · 2.99 KB
/
BaseMenuState.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//////////////////////////////////////////////////////////////////////////
// Filename : BaseMenuState.h
//
// Author : Ramon Johannessen (RJ)
//
// Purpose : Base Class for all menu states
//////////////////////////////////////////////////////////////////////////
#ifndef CBASEMENUSTATE_H
#define CBASEMENUSTATE_H
#include "IGameState.h"
#include "fmod.hpp"
#include "CSGD_TextureManager.h"
#include "Assets.h"
#include "Game.h"
#include "BitmapFont.h"
#include "Direct3D.h"
#include "CSGD_DirectInput.h"
class CBitmapFont;
class CAsset;
class CSGD_TextureManager;
class Direct3D;
class CSGD_DirectInput;
class CBaseMenuState : IGameState
{
private:
int m_nBGImageID; // bg image ID
int m_nImageWidth; // bg image width
int m_nImageHeight; // bg image height
int m_nCursorImageID; // the menu selection cursor image
int m_nCurrMenuSelection; // where is the menu cursor at?
int m_nCursorX; // screen x for cursor
int m_nCursorY; // screen y for cursor
FMOD::Sound m_sBGMusicID; // bg music track
CBitmapFont* m_pBitmapFont; // a pointer to the bitmap font singleton
CAsset* m_pAssets;
CSGD_TextureManager m_pTM;
FMOD::System* m_pFMOD;
Direct3D* m_pD3D;
CSGD_DirectInput* m_pDI;
//CBaseMenuState* m_pCurrentState;// a pointer to the current menu state
CBaseMenuState(const CBaseMenuState&);
CBaseMenuState& operator= (const CBaseMenuState&);
public:
CBaseMenuState();
~CBaseMenuState();
//////////////////////////////////////////////////////////////////////////
// Function : Update
//
// Purpose : Any update code goes here, pure virtual, virtual, to be overwritten
//////////////////////////////////////////////////////////////////////////
virtual void Update(float fElapsedTime);
//////////////////////////////////////////////////////////////////////////
// Function : Render
//
// Purpose : draw everything to the screen, virtual, to be overwritten
//////////////////////////////////////////////////////////////////////////
virtual void Render();
//////////////////////////////////////////////////////////////////////////
// Function : Input
//
// Purpose : Handle any user input for all menu states, mouse or keyboard, virtual, to be overwritten
//
// Return : true/false, false if we are exiting the game
//////////////////////////////////////////////////////////////////////////
virtual bool Input();
//////////////////////////////////////////////////////////////////////////
// Function : Enter
//
// Purpose : When the state is first entered, execute this code, virtual, to be overwritten
//////////////////////////////////////////////////////////////////////////
virtual void Enter();
//////////////////////////////////////////////////////////////////////////
// Function : Exit
//
// Purpose : When the state exits, execute this code, virtual, to be overwritten
//////////////////////////////////////////////////////////////////////////
virtual void Exit();
};
#endif