-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.h
122 lines (94 loc) · 2.3 KB
/
settings.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#ifndef _SETTINGS_H
#define _SETTINGS_H
// gef headers
#include <graphics/sprite.h>
// FRAMEWORK FORWARD DECLARATIONS
namespace gef
{
class Platform;
class Font;
class SpriteRenderer;
class InputManager;
class Texture;
class SonyController;
class TouchInputManager;
class Keyboard;
class Sprite;
class Vector2;
class Vector4;
} // gef
// My class forward declarations
enum GAMESTATE;
class Settings
{
public:
Settings(gef::Platform& platform, gef::InputManager* input_manager, GAMESTATE* gamestate, unsigned* camera_count, unsigned* difficulty_count, unsigned* number_of_grounds);
~Settings();
void SettingsInit();
void SettingsRelease();
void SettingsUpdate(float frame_time);
void SettingsRender();
inline const bool Quit() { return quit_; }
private:
// platform
gef::Platform& platform_;
// gamestate
GAMESTATE* gamestate_;
// camera
unsigned* camera_count_;
// difficulty
unsigned* difficulty_count_;
// number of grounds
unsigned* number_of_grounds_;
// input manager
gef::InputManager* input_manager_;
// sprite renderer
gef::SpriteRenderer* sprite_renderer_;
// icons textures
gef::Texture* playstation_left_d_pad_;
gef::Texture* playstation_right_d_pad_;
// camera illustration textures
gef::Texture* camera_1_texture_;
gef::Texture* camera_2_texture_;
gef::Texture* camera_3_texture_;
// font
gef::Font* font_;
float fps_;
int sfx_id_;
int sfx_voice_id_;
// quit
bool quit_;
// toggle fps display
bool dev_;
// menu box sprite
gef::Sprite menu_box_sprite_;
float sprite_width_;
float sprite_height;
// d-pad sprites
gef::Sprite left_d_pad_sprite_;
gef::Sprite right_d_pad_sprite_;
bool display_d_pad = true;
// menu text vectors
gef::Vector4 menu_text_1_;
gef::Vector4 menu_text_2_;
gef::Vector4 menu_text_3_;
gef::Vector4 menu_text_4_;
// menu text height correction
float height_correction_;
// controlls
void SonyController(const gef::SonyController* controller);
void TouchController(const gef::TouchInputManager* touch_input);
void KeyboardController(const gef::Keyboard* keyboard);
void MenuTouchInput();
Int32 active_touch_id_;
gef::Vector2 touch_position_;
void InitFont();
void CleanFont();
void DrawHUD();
void InitTextures();
void CleanTextures();
void InitSprites();
void CleanSprites();
void InitText();
};
#endif // !_SETTINGS_H