summary refs log tree commit diff stats
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 3da23a3..b7dd200 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -11,6 +11,7 @@
11#include "systems/orienting.h" 11#include "systems/orienting.h"
12#include "systems/playing.h" 12#include "systems/playing.h"
13#include "systems/scheduling.h" 13#include "systems/scheduling.h"
14#include "systems/realizing.h"
14#include "animation.h" 15#include "animation.h"
15#include "consts.h" 16#include "consts.h"
16 17
@@ -28,8 +29,9 @@ void key_callback(GLFWwindow* window, int key, int, int action, int)
28 game.systemManager_.input(key, action); 29 game.systemManager_.input(key, action);
29} 30}
30 31
31Game::Game() : world_("res/maps.xml") 32Game::Game()
32{ 33{
34 systemManager_.emplaceSystem<RealizingSystem>(*this);
33 systemManager_.emplaceSystem<PlayingSystem>(*this); 35 systemManager_.emplaceSystem<PlayingSystem>(*this);
34 systemManager_.emplaceSystem<SchedulingSystem>(*this); 36 systemManager_.emplaceSystem<SchedulingSystem>(*this);
35 systemManager_.emplaceSystem<ControllingSystem>(*this); 37 systemManager_.emplaceSystem<ControllingSystem>(*this);
@@ -38,8 +40,8 @@ Game::Game() : world_("res/maps.xml")
38 systemManager_.emplaceSystem<MappingSystem>(*this); 40 systemManager_.emplaceSystem<MappingSystem>(*this);
39 systemManager_.emplaceSystem<AnimatingSystem>(*this); 41 systemManager_.emplaceSystem<AnimatingSystem>(*this);
40 42
43 systemManager_.getSystem<RealizingSystem>().initSingleton("res/maps.xml");
41 systemManager_.getSystem<PlayingSystem>().initPlayer(); 44 systemManager_.getSystem<PlayingSystem>().initPlayer();
42 systemManager_.getSystem<MappingSystem>().loadMap(world_.getStartingMapId());
43 45
44 glfwSwapInterval(1); 46 glfwSwapInterval(1);
45 glfwSetWindowUserPointer(renderer_.getWindow().getHandle(), this); 47 glfwSetWindowUserPointer(renderer_.getWindow().getHandle(), this);