From b04f7c16935e63f35a46ffe9eec4e712c2b824c8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 19 Mar 2014 08:12:11 +0100 Subject: MADS: set public 2 inventory functions, fix signed/unsigned comparison --- engines/mads/inventory.cpp | 2 +- engines/mads/inventory.h | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'engines') 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 { 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 _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 -- cgit v1.2.3