From c3e32345e53650a1c231f4e1a41d40c97955b893 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 26 Sep 2014 00:58:27 +0200 Subject: Collision rework --- src/view/MapView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/view/MapView.cpp') 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 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{x, y}); if (!tile) continue; @@ -141,7 +141,7 @@ void MapView::render(const Model::Map *map, Model::Position center, uint6 Model::Direction dir = entity->getDirection(); SDL_Rect src = { - .x = getTileSize()*dir, + .x = getTileSize()*int(dir), .y = 0, .w = getTileSize(), .h = getTileSize(), -- cgit v1.2.3