summaryrefslogtreecommitdiff
path: root/src/flooritem.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-10 19:34:42 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-10 19:54:02 +0200
commitf2dbb7140f8efab0278ac17489b75c0c8ab60102 (patch)
tree400111c6fe5c6114a96d1e1a9178f8109725faec /src/flooritem.h
parent7f15330d969e5c973429d03ca767551e7b67c3c3 (diff)
downloadmana-f2dbb7140f8efab0278ac17489b75c0c8ab60102.tar.gz
mana-f2dbb7140f8efab0278ac17489b75c0c8ab60102.tar.bz2
mana-f2dbb7140f8efab0278ac17489b75c0c8ab60102.tar.xz
mana-f2dbb7140f8efab0278ac17489b75c0c8ab60102.zip
Fixed the problem with items disappearing beneath the road
Increased their pixel y coordinate by half a tile, to make them draw between the fringe and the beings.
Diffstat (limited to 'src/flooritem.h')
-rw-r--r--src/flooritem.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/flooritem.h b/src/flooritem.h
index 9911cd25..99074943 100644
--- a/src/flooritem.h
+++ b/src/flooritem.h
@@ -41,6 +41,12 @@ class FloorItem : public Sprite
public:
/**
* Constructor.
+ *
+ * @param id the unique ID of this item instance
+ * @param itemId the item ID
+ * @param x the x position in tiles
+ * @param y the y position in tiles
+ * @param map the map this item is on
*/
FloorItem(int id,
int itemId,
@@ -48,18 +54,15 @@ class FloorItem : public Sprite
int y,
Map *map);
- /**
- * Destructor.
- */
~FloorItem();
/**
- * Returns instance id of this item.
+ * Returns instance ID of this item.
*/
int getId() const { return mId; }
/**
- * Returns the item id.
+ * Returns the item ID.
*/
int getItemId() const;
@@ -70,12 +73,12 @@ class FloorItem : public Sprite
Item *getItem() const;
/**
- * Returns the x coordinate.
+ * Returns the x coordinate in tiles.
*/
int getX() const { return mX; }
/**
- * Returns the y coordinate.
+ * Returns the y coordinate in tiles.
*/
int getY() const { return mY; }
@@ -84,7 +87,7 @@ class FloorItem : public Sprite
*
* @see Sprite::getPixelY()
*/
- int getPixelY() const { return mY * 32; }
+ int getPixelY() const { return mY * 32 + 16; }
/**
* Draws this floor item to the given graphics context.