diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-03-29 01:26:56 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-03-29 01:26:56 +0200 |
commit | 15c69030f987bd7d67fdbaf2158b2c3ae430143f (patch) | |
tree | a8ec211017aad38cd9784c1c837cada34eab3dfe /src/flooritem.cpp | |
parent | ce94f62be91c98310281b33dbc7f4b79fd4e8052 (diff) | |
download | mana-15c69030f987bd7d67fdbaf2158b2c3ae430143f.tar.gz mana-15c69030f987bd7d67fdbaf2158b2c3ae430143f.tar.bz2 mana-15c69030f987bd7d67fdbaf2158b2c3ae430143f.tar.xz mana-15c69030f987bd7d67fdbaf2158b2c3ae430143f.zip |
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.
Diffstat (limited to 'src/flooritem.cpp')
-rw-r--r-- | src/flooritem.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
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()); } |