summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.h b/src/game.h index 69b8df7..cea154a 100644 --- a/src/game.h +++ b/src/game.h
@@ -6,6 +6,7 @@ class Game;
6#include "map.h" 6#include "map.h"
7#include <memory> 7#include <memory>
8#include "entity.h" 8#include "entity.h"
9#include <functional>
9 10
10const int TILE_WIDTH = 8; 11const int TILE_WIDTH = 8;
11const int TILE_HEIGHT = 8; 12const int TILE_HEIGHT = 8;
@@ -30,6 +31,7 @@ class Game {
30 void detectCollision(Entity& collider, std::pair<double, double> old_position); 31 void detectCollision(Entity& collider, std::pair<double, double> old_position);
31 void saveGame(const Map& map, std::pair<double, double> position); 32 void saveGame(const Map& map, std::pair<double, double> position);
32 void loadGame(const Map& curMap); 33 void loadGame(const Map& curMap);
34 void schedule(int frames, std::function<void ()>&& callback);
33 35
34 bool shouldQuit = false; 36 bool shouldQuit = false;
35 private: 37 private:
@@ -42,6 +44,7 @@ class Game {
42 Map m{"../maps/embarass.txt"}; 44 Map m{"../maps/embarass.txt"};
43 Map m2{"../maps/second.txt"}; 45 Map m2{"../maps/second.txt"};
44 Savefile save; 46 Savefile save;
47 std::list<std::pair<int, std::function<void ()>>> scheduled;
45}; 48};
46 49
47#endif 50#endif