diff options
Diffstat (limited to 'src/control/MapContext.hpp')
-rw-r--r-- | src/control/MapContext.hpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/control/MapContext.hpp b/src/control/MapContext.hpp index a9481a6..a60bdfc 100644 --- a/src/control/MapContext.hpp +++ b/src/control/MapContext.hpp @@ -44,11 +44,9 @@ private: EventBus *const eventBus; InputHandler *const inputHandler; - View::MapView *const view; + std::unique_ptr<View::MapView> view; - std::shared_ptr<const Model::Map> map; - - std::vector<std::unique_ptr<Model::Entity>> entities; + Model::Map map; Model::Entity *playerEntity; void movePlayer(Model::Direction dir, uint64_t time); @@ -60,10 +58,10 @@ private: } public: - MapContext(EventBus *eventBus0, InputHandler *inputHandler0, View::MapView *view0, const std::shared_ptr<const Model::Map> &map0); + MapContext(EventBus *eventBus0, InputHandler *inputHandler0, const std::shared_ptr<View::Window> &window, const Model::Map &map0); void render(uint64_t time) { - view->render(entities, getViewPosition(time), time); + view->render(&map, getViewPosition(time), time); } }; |