diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2019-09-26 11:35:31 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2019-09-26 11:35:31 -0400 |
commit | 5fa8ec8586e3c9087fd68129e1b7d7f94e847a09 (patch) | |
tree | 451946789bd3fc0b79a80b5b3007d26c2159f428 /src/engine.cpp | |
parent | 00da4d690af08d45788d770f9aadc9548438f074 (diff) |
begin config usage; text positioning
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index e53f266..b1d9a56 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +#include "config.hpp" #include "engine.hpp" #include "gamestate.hpp" #include "gamerun.hpp" @@ -43,6 +44,8 @@ typedef std::chrono::high_resolution_clock mc; int Engine::init(void) { + Config::load(); + systems.add<GameRunSystem>(); systems.add<InputSystem>(); systems.add<PlayerSystem>(entities); @@ -178,8 +181,9 @@ void Engine::run(void) physicsThread.join(); debugThread.join(); - // Save the entities' data + // Save the entities' data, and settings data GameState::save("save.json", entities); + Config::save(); // Remove all Lua references from entities entities.each<Scripted>([](entityx::Entity, Scripted &f) { |