diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 02:27:30 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 02:27:30 +0200 |
commit | b5c7b4a162a780980b3ecacf0edd49541888a0a8 (patch) | |
tree | a401b50e2e8071fc6aec6b5392997b902e1b721d /src/control/MapContext.hpp | |
parent | ea8840291cdf66784c6a2cb465b63ccfb5483c38 (diff) | |
download | rpgedit-b5c7b4a162a780980b3ecacf0edd49541888a0a8.tar rpgedit-b5c7b4a162a780980b3ecacf0edd49541888a0a8.zip |
Move more SDL-specific things to the view
Diffstat (limited to 'src/control/MapContext.hpp')
-rw-r--r-- | src/control/MapContext.hpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/control/MapContext.hpp b/src/control/MapContext.hpp index 446ca10..0612dd3 100644 --- a/src/control/MapContext.hpp +++ b/src/control/MapContext.hpp @@ -27,7 +27,6 @@ #pragma once #include "EventBus.hpp" -#include "ImageLoader.hpp" #include "InputHandler.hpp" #include "../model/Map.hpp" #include "../view/MapView.hpp" @@ -44,13 +43,9 @@ class MapContext { private: EventBus *const eventBus; InputHandler *const inputHandler; - ImageLoader *const imageLoader; std::shared_ptr<const Model::Map> map; - std::vector<SDL_Surface *> tiles; - std::map<std::string, SDL_Surface *> entities; - uint64_t totalTicks = 0; void movePlayer(Model::Direction dir, uint64_t time); @@ -58,14 +53,14 @@ private: void keyPressed(uint16_t key, uint64_t time); public: - MapContext(EventBus *eventBus0, InputHandler *inputHandler0, ImageLoader *imageLoader0, const std::shared_ptr<const Model::Map> &map0); + MapContext(EventBus *eventBus0, InputHandler *inputHandler0, const std::shared_ptr<const Model::Map> &map0); Model::Position getViewPosition(uint64_t time) { return map->getPlayerEntity()->getPosition(time); } std::shared_ptr<View::MapView> initView(const std::shared_ptr<View::Window> &window) { - return std::make_shared<View::MapView>(window, map, tiles, entities); + return std::make_shared<View::MapView>(window, map); } }; |