summary refs log tree commit diff stats
path: root/src/game.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-05 11:51:24 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-05 11:51:24 -0500
commitda3df061699203eccc9a0c98becaee3ce8050a4f (patch)
treee5082da630d73abc1ecc0b0367d420fbf245126c /src/game.cpp
parenta855ce0262e17b85e8670c511acf179ebddd24fe (diff)
downloadtherapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.gz
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.bz2
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.zip
Whitespace changes
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index b3fa9a8..5d1ec18 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -45,24 +45,24 @@ void Game::execute()
45 double lastTime = glfwGetTime(); 45 double lastTime = glfwGetTime();
46 const double dt = 0.01; 46 const double dt = 0.01;
47 double accumulator = 0.0; 47 double accumulator = 0.0;
48 48
49 while (!(shouldQuit || glfwWindowShouldClose(window))) 49 while (!(shouldQuit || glfwWindowShouldClose(window)))
50 { 50 {
51 double currentTime = glfwGetTime(); 51 double currentTime = glfwGetTime();
52 double frameTime = currentTime - lastTime; 52 double frameTime = currentTime - lastTime;
53 lastTime = currentTime; 53 lastTime = currentTime;
54 54
55 glfwPollEvents(); 55 glfwPollEvents();
56 56
57 accumulator += frameTime; 57 accumulator += frameTime;
58 while (accumulator >= dt) 58 while (accumulator >= dt)
59 { 59 {
60 systemManager.getSystem<ControllingSystem>().tick(dt); 60 systemManager.getSystem<ControllingSystem>().tick(dt);
61 systemManager.getSystem<PonderingSystem>().tick(dt); 61 systemManager.getSystem<PonderingSystem>().tick(dt);
62 62
63 accumulator -= dt; 63 accumulator -= dt;
64 } 64 }
65 65
66 systemManager.getSystem<RenderingSystem>().tick(frameTime); 66 systemManager.getSystem<RenderingSystem>().tick(frameTime);
67 } 67 }
68} 68}