diff options
Diffstat (limited to 'src/control/MapContext.hpp')
-rw-r--r-- | src/control/MapContext.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/control/MapContext.hpp b/src/control/MapContext.hpp index 703a582..a98d818 100644 --- a/src/control/MapContext.hpp +++ b/src/control/MapContext.hpp @@ -26,10 +26,11 @@ #pragma once -#include "TileLoader.hpp" +#include "ImageLoader.hpp" #include "../model/Map.hpp" #include "../view/MapView.hpp" +#include <map> #include <memory> @@ -39,16 +40,18 @@ namespace Control { class MapContext { private: - TileLoader *const tileLoader; + ImageLoader *const imageLoader; std::shared_ptr<const Model::Map> map; + std::vector<SDL_Surface *> tiles; + std::map<std::string, SDL_Surface *> entities; public: - MapContext(TileLoader *tileLoader0, const std::shared_ptr<const Model::Map> &map0); + MapContext(ImageLoader *imageLoader0, const std::shared_ptr<const Model::Map> &map0); std::shared_ptr<View::MapView> initView(const std::shared_ptr<View::Window> &window) { - return std::make_shared<View::MapView>(window, map, tiles); + return std::make_shared<View::MapView>(window, map, tiles, entities); } }; |