summaryrefslogtreecommitdiffstats
path: root/src/control/MapContext.hpp
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-22 21:54:01 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-22 21:54:01 +0200
commitfe0c3b733abf6eac5f4b5bc18f24f8a5cda1bfc4 (patch)
tree6f96e327b37fad557bd7cba7b45911c401f98ad2 /src/control/MapContext.hpp
parent6e67a0f13263b748718c692b4c6481a70b127fda (diff)
downloadrpgedit-fe0c3b733abf6eac5f4b5bc18f24f8a5cda1bfc4.tar
rpgedit-fe0c3b733abf6eac5f4b5bc18f24f8a5cda1bfc4.zip
Render entities
Diffstat (limited to 'src/control/MapContext.hpp')
-rw-r--r--src/control/MapContext.hpp11
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);
}
};