-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
76 lines (56 loc) · 1.24 KB
/
Game.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
#pragma once
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <fstream>
#include <map>
#include "player.h"
using namespace std;
enum GameState
{
STATE_LOGO,
STATE_TITLE,
STATE_MENU,
STATE_GAME,
STATE_CONTROLS,/*
STATE_CREDITS,
STATE_PLAYING,
STATE_PAUSED,
STATE_GAMEOVER,
STATE_VICTORY*/
};
class CGame
{
public:
CGame(void);
~CGame(void);
//SDL Functions and loading Blips
static void flip();
static void AirHornOn();
static int LoadImages();
static int FreeImages();
static void Think();
static void Render();
static void RegulateFrameRate();
static void SetGameState(int state);
static void DrawLogos();
static void DrawTitle();
//Logical Functions, mainly math
static int IntRand();
//Variables sit over here.
static SDL_Event GameEvent;
static map<string, string> SpriteList;
static SDL_Surface *airhorn;
static SDL_Surface *airhorn_off;
static SDL_Surface *title_logo;
static SDL_Surface *logo1;
static SDL_Surface *logo2;
static SDL_Surface *player_sprite;
static SDL_Surface *betatext;
//CPlayer playerEnt;
private:
static int gamestate;
static int logoframe;
static int fadeAmount;
static int logoheight;
};