From aadcecf2022ec13d15da5d816567779740a37da7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 24 Sep 2014 15:22:09 +0200 Subject: Keep mutable entity list in the MapContext only --- src/view/MapView.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/view/MapView.hpp') diff --git a/src/view/MapView.hpp b/src/view/MapView.hpp index e764297..e128a93 100644 --- a/src/view/MapView.hpp +++ b/src/view/MapView.hpp @@ -44,7 +44,7 @@ private: std::shared_ptr map; SDL_Texture *tiles; - std::map entities; + std::map entitySprites; int getTileSize() { return 32; @@ -55,7 +55,10 @@ public: const std::shared_ptr &map0); ~MapView(); - void render(float centerX, float centerY, uint64_t time); + void updateEntities(const std::vector> &entities); + void clearEntities(); + + void render(const std::vector> &entities, Model::Position center, uint64_t time); }; } -- cgit v1.2.3