summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 03:13:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 03:13:26 +0200
commit124116a8bf56ccc742e6efcb3b9e83abe97bf143 (patch)
tree7ab23aab342477c80af3a0e5c8fb98da90c94548 /src/view
parent9b91d6f3d0187e0daf29a262cf19ad08ba2b7cf5 (diff)
downloadrpgedit-124116a8bf56ccc742e6efcb3b9e83abe97bf143.tar
rpgedit-124116a8bf56ccc742e6efcb3b9e83abe97bf143.zip
Extend map model with rotated tiles
Diffstat (limited to 'src/view')
-rw-r--r--src/view/MapView.cpp4
-rw-r--r--src/view/MapView.hpp2
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);