aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mads/inventory.cpp2
-rw-r--r--engines/mads/inventory.h23
2 files changed, 13 insertions, 12 deletions
diff --git a/engines/mads/inventory.cpp b/engines/mads/inventory.cpp
index 4f6ba48027..b697462cae 100644
--- a/engines/mads/inventory.cpp
+++ b/engines/mads/inventory.cpp
@@ -110,7 +110,7 @@ void InventoryObjects::addToInventory(int objectId) {
userInterface._inventoryTopIndex = CLIP(userInterface._inventoryTopIndex,
0, (int)_inventoryList.size() - 1);
- if ((userInterface._inventoryTopIndex + 5) <= (size() - 1))
+ if ((userInterface._inventoryTopIndex + 5) <= ((int) size() - 1))
userInterface._inventoryTopIndex = size() - 5;
userInterface._inventoryChanged = true;
diff --git a/engines/mads/inventory.h b/engines/mads/inventory.h
index 245d439188..2ca270649e 100644
--- a/engines/mads/inventory.h
+++ b/engines/mads/inventory.h
@@ -54,17 +54,6 @@ class InventoryObjects: public Common::Array<InventoryObject> {
private:
MADSEngine *_vm;
- /**
- * Removes the specified object from the player's inventory
- */
- void addToInventory(int objectId);
-
- /**
- * Removes the specified object to the player's inventory
- * @param objectId Object to remove
- * @param newScene Specifies the new scene to set the item to
- */
- void removeFromInventory(int objectId, int newScene);
public:
Common::Array<int> _inventoryList;
@@ -104,6 +93,18 @@ public:
* Returns true if a given object is in the player's inventory
*/
bool isInInventory(int objectId) const;
+
+ /**
+ * Removes the specified object from the player's inventory
+ */
+ void addToInventory(int objectId);
+
+ /**
+ * Removes the specified object to the player's inventory
+ * @param objectId Object to remove
+ * @param newScene Specifies the new scene to set the item to
+ */
+ void removeFromInventory(int objectId, int newScene);
};
} // End of namespace MADS