summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flooritem.h19
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/item.h4
3 files changed, 14 insertions, 11 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.
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index a7be69b8..efa5bc2e 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -184,7 +184,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
}
}
-Item* InventoryWindow::getSelectedItem() const
+Item *InventoryWindow::getSelectedItem() const
{
return mItems->getSelectedItem();
}
diff --git a/src/item.h b/src/item.h
index 87a37e08..0e27aa4c 100644
--- a/src/item.h
+++ b/src/item.h
@@ -56,7 +56,7 @@ class Item
/**
* Returns the item image.
*/
- Image* getImage() { return mImage; }
+ Image *getImage() { return mImage; }
/**
* Sets the number of items.
@@ -106,7 +106,7 @@ class Item
/**
* Returns information about this item type.
*/
- const ItemInfo& getInfo() const { return ItemDB::get(mId); }
+ const ItemInfo &getInfo() const { return ItemDB::get(mId); }
protected:
int mId; /**< Item type id. */