summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/inventory.h b/src/inventory.h
index aa5c8d1d..2fbbbf4c 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -80,7 +80,7 @@ class Inventory
/**
* Returns id of next free slot or -1 if all occupied.
*/
- int getFreeSlot();
+ int getFreeSlot() const;
/**
* Reset all item slots.
@@ -90,12 +90,17 @@ class Inventory
/**
* Get the number of slots filled with an item
*/
- int getNumberOfSlotsUsed();
+ int getNumberOfSlotsUsed() const;
/**
* Returns the index of the last occupied slot or 0 if none occupied.
*/
- int getLastUsedSlot();
+ int getLastUsedSlot() const;
+
+ /**
+ * Returns the number of slots available in the inventory.
+ */
+ int getInventorySize() const;
protected:
Item **mItems; /**< The holder of items */