summaryrefslogtreecommitdiffstats
path: root/src/control/MapContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/MapContext.cpp')
-rw-r--r--src/control/MapContext.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/control/MapContext.cpp b/src/control/MapContext.cpp
index a981e8a..5c715db 100644
--- a/src/control/MapContext.cpp
+++ b/src/control/MapContext.cpp
@@ -31,19 +31,8 @@ namespace RPGEdit {
namespace Control {
-MapContext::MapContext(EventBus *eventBus0, InputHandler *inputHandler0, ImageLoader *imageLoader0, const std::shared_ptr<const Model::Map> &map0)
- : eventBus(eventBus0), inputHandler(inputHandler0), imageLoader(imageLoader0), map(map0) {
- const std::vector<std::string> &tileset = map->getTileset();
-
- tiles.resize(tileset.size());
- for (size_t i = 0; i < tileset.size(); i++)
- tiles[i] = imageLoader->get("tile/" + tileset[i]);
-
- std::deque<std::shared_ptr<Model::Entity>> &mapEntities = map->getEntities();
-
- for (const std::shared_ptr<Model::Entity> &entity : mapEntities)
- entities[entity->getName()] = imageLoader->get("entity/" + entity->getName());
-
+MapContext::MapContext(EventBus *eventBus0, InputHandler *inputHandler0, const std::shared_ptr<const Model::Map> &map0)
+ : eventBus(eventBus0), inputHandler(inputHandler0), map(map0) {
inputHandler->registerListener(
[this] (uint16_t key, bool pressed, uint64_t time) {
if (pressed)