summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
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(),