summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/item.h b/src/item.h
index f5d0fc77..fc71e53d 100644
--- a/src/item.h
+++ b/src/item.h
@@ -26,6 +26,8 @@
#include "resources/itemdb.h"
+class Image;
+
/**
* Represents one or more instances of a certain item type.
*/
@@ -38,6 +40,11 @@ class Item
Item(int id = 0, int quantity = 0);
/**
+ * Destructor.
+ */
+ ~Item();
+
+ /**
* Sets the item id, identifying the item type.
*/
void setId(int id);
@@ -49,6 +56,11 @@ class Item
getId() const { return mId; }
/**
+ * Returns the item image.
+ */
+ Image* getImage() { return mImage; }
+
+ /**
* Sets the number of items.
*/
void
@@ -92,6 +104,7 @@ class Item
protected:
int mId; /**< Item type id. */
+ Image *mImage; /**< Item image. */
int mQuantity; /**< Number of items. */
bool mEquipment; /**< Item is equipment. */
int mInvIndex; /**< Inventory index. */