-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgamestates.h
74 lines (66 loc) · 1.23 KB
/
gamestates.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
#ifndef GAMESTATES_H
#define GAMESTATES_H
#include <vector>
enum GameStates
{
STATE_NULL,
STATE_INTRO,
STATE_GAME,
STATE_HELP,
STATE_CREDITS,
STATE_HIGHSCORES,
STATE_EXIT,
};
class GameState
{
public:
virtual void handle_events() = 0;
virtual void logic() = 0;
virtual void render() = 0;
virtual ~GameState() {};
};
class Intro : public GameState
{
private:
SDL_Surface *title, *help, *creds;
public:
Intro();
~Intro();
void handle_events();
void logic();
void render();
};
class Help : public GameState
{
private:
SDL_Surface *up, *down, *lr, *esc, *pse;
public:
Help();
~Help();
void handle_events();
void logic();
void render();
};
class Credits : public GameState
{
private:
SDL_Surface *ft, *lib, *auth;
public:
Credits();
~Credits();
void handle_events();
void logic();
void render();
};
class HighScores : public GameState
{
private:
SDL_Surface *scores, *esc;
public:
HighScores();
~HighScores();
void handle_events();
void logic();
void render();
};
#endif