-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEngine.hpp
51 lines (40 loc) · 870 Bytes
/
Engine.hpp
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
class Actor;
class Map;
class Engine {
public:
enum GameStatus {
STARTUP,
IDLE,
NEW_TURN,
VICTORY,
DEFEAT
} gameStatus;
TCODList<Actor *> actors;
Actor *player;
Actor *stairs;
Map *map;
int fovRadius;
int screenWidth;
int screenHeight;
Gui *gui;
TCOD_key_t lastKey;
TCOD_mouse_t mouse;
TCODList<Map *> levels;
int level;
void nextLevel();
Engine(int screenWidth, int screenHeight);
~Engine();
void update();
void render();
void sendToBack(Actor *actor);
Actor *getClosestMonster(int x, int y, float range) const;
Actor *getActor(int x, int y) const;
bool pickATile(int *x, int *y, float maxRange = 0.0f);
void init();
void load();
void save();
void term();
private:
bool computeFov;
};
extern Engine engine;