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 19:25:23 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 19:25:23 -0400
commit6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b (patch)
tree0a884ddd12b4e5b0afcc9c4ecaea5ecc73605b57 /src/game.h
parentd9349f10d6d1972e87aea76d502703fae128a0e5 (diff)
downloadtherapy-6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b.tar.gz
therapy-6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b.tar.bz2
therapy-6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b.zip
Added sound when you hit the ground
Also split up components.cpp into files for each class, fixed a bug concerning falling off the screen when you change maps, and converted collision data into doubles.
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game.h b/src/game.h index bc31912..a4620d4 100644 --- a/src/game.h +++ b/src/game.h
@@ -28,7 +28,7 @@ class Game {
28 public: 28 public:
29 Game(); 29 Game();
30 void execute(GLFWwindow* window); 30 void execute(GLFWwindow* window);
31 void loadMap(const Map& map); 31 void loadMap(const Map& map, std::pair<double, double> position);
32 void detectCollision(Entity& collider, std::pair<double, double> old_position); 32 void detectCollision(Entity& collider, std::pair<double, double> old_position);
33 void saveGame(); 33 void saveGame();
34 void schedule(double time, std::function<void ()> callback); 34 void schedule(double time, std::function<void ()> callback);
@@ -39,6 +39,7 @@ class Game {
39 39
40 std::list<std::shared_ptr<Entity>> entities; 40 std::list<std::shared_ptr<Entity>> entities;
41 std::list<std::shared_ptr<Entity>> nextEntities; 41 std::list<std::shared_ptr<Entity>> nextEntities;
42 std::pair<double, double> nextPosition;
42 bool newWorld; 43 bool newWorld;
43 std::shared_ptr<Entity> player; 44 std::shared_ptr<Entity> player;
44 const Map* currentMap; 45 const Map* currentMap;