diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-02 01:42:36 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-02 01:42:36 -0400 |
commit | b52920a35eb69d1a258c737e3114fbe5cfe9aca5 (patch) | |
tree | b3a7363b6f4bae8cda513a54ef84069103e6388b /src/engine.cpp | |
parent | ea35ad60506407040f7b9fae65c5bdc18f9576bb (diff) |
Changed Lua Idle function names
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index aa3ccc5..2916a6e 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -30,6 +30,10 @@ #include "components/Position.hpp" #include "components/Velocity.hpp" +using namespace std::chrono_literals; +namespace cr = std::chrono; +typedef std::chrono::high_resolution_clock mc; + int Engine::init(void) { systems.add<GameRunSystem>(); @@ -46,10 +50,6 @@ int Engine::init(void) void Engine::logicLoop(void) { - using namespace std::chrono_literals; - namespace cr = std::chrono; - typedef std::chrono::high_resolution_clock mc; - entityx::TimeDelta dt = 0; /**< Elapsed milliseconds since each loop */ double elapsed = 0; @@ -98,9 +98,9 @@ void Engine::logicLoop(void) void Engine::renderLoop(void) { + entityx::TimeDelta dt = 0; /**< Elapsed milliseconds since each loop */ while (shouldRun()) { - systems.update<RenderSystem>(0); - std::this_thread::yield(); + systems.update<RenderSystem>(dt); } } |