From 15c69030f987bd7d67fdbaf2158b2c3ae430143f Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 29 Mar 2011 01:26:56 +0200 Subject: Added the Map::getTileCenter() convenience function. and made use of it through the tA code. I also remove the obsolete TODO in the flooritem class. --- src/flooritem.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/flooritem.cpp') diff --git a/src/flooritem.cpp b/src/flooritem.cpp index c5a031fe..8805ba88 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -38,11 +38,7 @@ FloorItem::FloorItem(int id, { setMap(map); - // TODO: Eventually, we probably should fix all sprite offsets so that - // these translations aren't necessary anymore. The sprites know - // best where their base point should be. - mPos.x = x * map->getTileWidth() + 16; - mPos.y = y * map->getTileHeight() + 16; + mPos = map->getTileCenter(x, y); setupSpriteDisplay(itemDb->get(itemId).getDisplay()); } -- cgit v1.2.3-70-g09d2