From b5c7b4a162a780980b3ecacf0edd49541888a0a8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 24 Sep 2014 02:27:30 +0200 Subject: Move more SDL-specific things to the view --- src/control/MapContext.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/control/MapContext.hpp') 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 map; - std::vector tiles; - std::map 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 &map0); + MapContext(EventBus *eventBus0, InputHandler *inputHandler0, const std::shared_ptr &map0); Model::Position getViewPosition(uint64_t time) { return map->getPlayerEntity()->getPosition(time); } std::shared_ptr initView(const std::shared_ptr &window) { - return std::make_shared(window, map, tiles, entities); + return std::make_shared(window, map); } }; -- cgit v1.2.3