summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 00:58:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-26 00:58:27 +0200
commitc3e32345e53650a1c231f4e1a41d40c97955b893 (patch)
tree93b22aedbe355173510a04eafec9f14d7c4c3e0f /src/view
parent8b4ca336ce68cc17573115dd07eb1bfc6521b298 (diff)
downloadrpgedit-c3e32345e53650a1c231f4e1a41d40c97955b893.tar
rpgedit-c3e32345e53650a1c231f4e1a41d40c97955b893.zip
Collision rework
Diffstat (limited to 'src/view')
-rw-r--r--src/view/MapView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/view/MapView.cpp b/src/view/MapView.cpp
index 287fc87..78bc24c 100644
--- a/src/view/MapView.cpp
+++ b/src/view/MapView.cpp
@@ -113,7 +113,7 @@ void MapView::render(const Model::Map *map, Model::Position<float> center, uint6
for (size_t layer = 0; layer < map->getLayerCount(); layer++) {
for (int x = minX; x <= maxX; x++) {
for (int y = minY; y <= maxY; y++) {
- uint32_t tile = map->getTileAt(layer, x, y);
+ uint32_t tile = map->getTileAt(layer, Model::Position<int>{x, y});
if (!tile)
continue;
@@ -141,7 +141,7 @@ void MapView::render(const Model::Map *map, Model::Position<float> center, uint6
Model::Direction dir = entity->getDirection();
SDL_Rect src = {
- .x = getTileSize()*dir,
+ .x = getTileSize()*int(dir),
.y = 0,
.w = getTileSize(),
.h = getTileSize(),