diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/MapView.cpp | 4 | ||||
-rw-r--r-- | src/view/MapView.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/view/MapView.cpp b/src/view/MapView.cpp index c1c0639..20d5af5 100644 --- a/src/view/MapView.cpp +++ b/src/view/MapView.cpp @@ -31,7 +31,7 @@ namespace RPGEdit { namespace View { -MapView::MapView(const std::shared_ptr<Window> &window0, const std::vector<std::string> &tileset) +MapView::MapView(const std::shared_ptr<Window> &window0, const std::vector<std::pair<std::string, int>> &tileset) : window(window0) { uint32_t rmask, gmask, bmask, amask; @@ -59,7 +59,7 @@ MapView::MapView(const std::shared_ptr<Window> &window0, const std::vector<std:: .h = 0, }; - SDL_Surface *sprite = spriteCache->get("tile", tileset[i], 0); + SDL_Surface *sprite = spriteCache->get("tile", tileset[i].first, tileset[i].second); SDL_SetSurfaceBlendMode(sprite, SDL_BLENDMODE_NONE); SDL_BlitSurface(sprite, nullptr, surface, &rect); diff --git a/src/view/MapView.hpp b/src/view/MapView.hpp index 9a27328..c5867cc 100644 --- a/src/view/MapView.hpp +++ b/src/view/MapView.hpp @@ -50,7 +50,7 @@ private: } public: - MapView(const std::shared_ptr<Window> &window0, const std::vector<std::string> &tileset); + MapView(const std::shared_ptr<Window> &window0, const std::vector<std::pair<std::string, int>> &tileset); ~MapView(); void updateEntities(const std::vector<std::unique_ptr<Model::Entity>> &entities); |