-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
70 lines (47 loc) · 1.06 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
#pragma once
#include <allegro5\allegro5.h>
#include <allegro5\allegro_primitives.h>
#include <allegro5\allegro_font.h>
#include <allegro5\allegro_ttf.h>
#include <allegro5\allegro_image.h>
#include "Sprite.h"
#include "TileMap.h"
#include <sstream>
using std::stringstream;
class Game
{
private:
ALLEGRO_DISPLAY* display;
ALLEGRO_EVENT_QUEUE* evQueue;
ALLEGRO_TIMER* timer;
bool InitializeAllegro();
void DeinitializeAllegro();
Sprite* player;
Sprite* follower;
TileMap* map;
ALLEGRO_BITMAP * playerBMP;
ALLEGRO_BITMAP* followerBMP;
ALLEGRO_BITMAP* background;
ALLEGRO_FONT* font;
ALLEGRO_FONT* msgFont;
int TILE_SIZE;
int YOFFSET;
int MAXLVL;
int currentLvl;
void Draw();
void DrawEnd();
bool inGame;
bool inLevel;
void UpdateObject(Sprite* object);
bool CheckForTileCollision(int nexX, int newY, bool isFollower);
void CheckObjectCollisions(Sprite* object);
Sprite* GetSpriteCollision(Sprite* object);
void GameLoop();
void GameTutorial();
bool GameMenu();
string assembleMapName();
public:
Game(void);
~Game(void);
void Run();
};