summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-13 11:14:01 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-13 11:14:01 -0400
commitb8d62ce8d2f7c8f38aa9c52ab8d7dd32dc3aba64 (patch)
tree42720ef2eefaf42abc25937e9a2a78cd6998f0f6 /src/game.h
parent47d9d7884c57c2c14dd363b4ccb0df1dcbb5375e (diff)
downloadtherapy-b8d62ce8d2f7c8f38aa9c52ab8d7dd32dc3aba64.tar.gz
therapy-b8d62ce8d2f7c8f38aa9c52ab8d7dd32dc3aba64.tar.bz2
therapy-b8d62ce8d2f7c8f38aa9c52ab8d7dd32dc3aba64.zip
Fixed my timestep!
http://gafferongames.com/game-physics/fix-your-timestep/
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game.h b/src/game.h index 4f2f3df..c7c2625 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(int frames, 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:
@@ -43,7 +43,7 @@ class Game {
43 Map m{"../maps/embarass.txt"}; 43 Map m{"../maps/embarass.txt"};
44 Map m2{"../maps/second.txt"}; 44 Map m2{"../maps/second.txt"};
45 Savefile save; 45 Savefile save;
46 std::list<std::pair<int, std::function<void ()>>> scheduled; 46 std::list<std::pair<double, std::function<void ()>>> scheduled;
47 bool shouldQuit = false; 47 bool shouldQuit = false;
48}; 48};
49 49