From d13de51121a332cf8613a38d7ed5468f971c999f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 1 Oct 2013 22:30:44 +0300 Subject: replace tile size from 32 to mapTitleSize. --- src/flooritem.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/flooritem.cpp') diff --git a/src/flooritem.cpp b/src/flooritem.cpp index c5a07a74d..81ffa67cc 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -66,8 +66,10 @@ FloorItem::FloorItem(const int id, const int itemId, const int x, const int y, subY = max; else if (subY < -max) subY = -max; - mPos.x = static_cast(x * map->getTileWidth() + subX + 16 - 8); - mPos.y = static_cast(y * map->getTileHeight() + subY + 32 - 8); + mPos.x = static_cast(x * map->getTileWidth() + + subX + mapTileSize / 2 - 8); + mPos.y = static_cast(y * map->getTileHeight() + + subY + mapTileSize - 8); } else { @@ -112,8 +114,8 @@ bool FloorItem::draw(Graphics *const graphics, font = gui->getFont(); if (mDropTime < curTime) { - const int dx = 32; - const int dy = 32; + const int dx = mapTileSize; + const int dy = mapTileSize; if (curTime > mDropTime + 28 && curTime < mDropTime + 50) { -- cgit v1.2.3-60-g2f50