summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 16:13:11 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 16:13:11 -0400
commit44324ba5d6cac01048cc5cbecbff255ee56f2fc0 (patch)
tree63e859067d214bfccf1d75520e1cedece0e91963 /src/game.h
parent5990e7802c84b3f407de3934a1d75721115d1da7 (diff)
downloadtherapy-44324ba5d6cac01048cc5cbecbff255ee56f2fc0.tar.gz
therapy-44324ba5d6cac01048cc5cbecbff255ee56f2fc0.tar.bz2
therapy-44324ba5d6cac01048cc5cbecbff255ee56f2fc0.zip
Wrote simple factory to read map and entity data from XML files
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.h b/src/game.h index c7c2625..33d1965 100644 --- a/src/game.h +++ b/src/game.h
@@ -30,7 +30,7 @@ class Game {
30 void loadMap(const Map& map); 30 void loadMap(const Map& map);
31 void detectCollision(Entity& collider, std::pair<double, double> old_position); 31 void detectCollision(Entity& collider, std::pair<double, double> old_position);
32 void saveGame(const Map& map, std::pair<double, double> position); 32 void saveGame(const Map& map, std::pair<double, double> position);
33 void schedule(double time, std::function<void ()>&& callback); 33 void schedule(double time, std::function<void ()> callback);
34 void playerDie(Entity& player, const Map& curMap); 34 void playerDie(Entity& player, const Map& curMap);
35 35
36 private: 36 private:
@@ -40,8 +40,8 @@ class Game {
40 std::list<std::shared_ptr<Entity>> nextEntities; 40 std::list<std::shared_ptr<Entity>> nextEntities;
41 bool newWorld; 41 bool newWorld;
42 std::shared_ptr<Entity> player; 42 std::shared_ptr<Entity> player;
43 Map m{"../maps/embarass.txt"}; 43 Map m {Map::getNamedMap("embarass")};
44 Map m2{"../maps/second.txt"}; 44 Map m2 {Map::getNamedMap("second")};
45 Savefile save; 45 Savefile save;
46 std::list<std::pair<double, std::function<void ()>>> scheduled; 46 std::list<std::pair<double, std::function<void ()>>> scheduled;
47 bool shouldQuit = false; 47 bool shouldQuit = false;