summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
commit0e925e97554aae573e895afa4e3d8450f01df342 (patch)
treebbc30319410aecb9fec7c005e667cd7fb628bb17 /src/inventory.h
parentffa0fae492d954c0aed35a0acbd7b856778d7328 (diff)
downloadmana-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/inventory.h')
-rw-r--r--src/inventory.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inventory.h b/src/inventory.h
index 7a9e6ad2..48ace29c 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -44,7 +44,7 @@ class Inventory
/**
* Returns the item at the specified index.
*/
- Item* getItem(int index);
+ Item* getItem(int index) const;
/**
* Adds a new item in a free slot.
@@ -52,9 +52,9 @@ class Inventory
void addItem(int id, int quantity);
/**
- * Adds a new item at a given position.
+ * Sets the item at the given position.
*/
- void addItem(int index, int id, int quantity);
+ void setItem(int index, int id, int quantity);
/**
* Remove a item from the inventory.
@@ -93,7 +93,7 @@ class Inventory
static const int NO_SLOT_INDEX = -1; /**< Slot has no index. */
protected:
- Item *mItems; /**< The holder of items */
+ Item **mItems; /**< The holder of items */
};
#endif