diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-15 23:44:01 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-15 23:44:01 +0000 |
commit | 0e925e97554aae573e895afa4e3d8450f01df342 (patch) | |
tree | bbc30319410aecb9fec7c005e667cd7fb628bb17 /src/item.h | |
parent | ffa0fae492d954c0aed35a0acbd7b856778d7328 (diff) | |
download | mana-0e925e97554aae573e895afa4e3d8450f01df342.tar.gz mana-0e925e97554aae573e895afa4e3d8450f01df342.tar.bz2 mana-0e925e97554aae573e895afa4e3d8450f01df342.tar.xz mana-0e925e97554aae573e895afa4e3d8450f01df342.zip |
Moved item icon from ItemInfo class to the Item class, so that it can be loaded
on demand. Results in faster startup time and reduced memory usage.
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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. */ |