diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 15:22:09 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 15:22:09 +0200 |
commit | aadcecf2022ec13d15da5d816567779740a37da7 (patch) | |
tree | 1d1c5c448c69deea35d689d89cfd7abdd754e649 /src/view/MapView.hpp | |
parent | ccf859fe805afe8db3aa694df5d26da7778dfc68 (diff) | |
download | rpgedit-aadcecf2022ec13d15da5d816567779740a37da7.tar rpgedit-aadcecf2022ec13d15da5d816567779740a37da7.zip |
Keep mutable entity list in the MapContext only
Diffstat (limited to 'src/view/MapView.hpp')
-rw-r--r-- | src/view/MapView.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
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<const Model::Map> map; SDL_Texture *tiles; - std::map<std::string, SDL_Texture *> entities; + std::map<std::string, SDL_Texture *> entitySprites; int getTileSize() { return 32; @@ -55,7 +55,10 @@ public: const std::shared_ptr<const Model::Map> &map0); ~MapView(); - void render(float centerX, float centerY, uint64_t time); + void updateEntities(const std::vector<std::unique_ptr<Model::Entity>> &entities); + void clearEntities(); + + void render(const std::vector<std::unique_ptr<Model::Entity>> &entities, Model::Position center, uint64_t time); }; } |