diff options
author | Strangerke | 2014-03-19 08:12:11 +0100 |
---|---|---|
committer | Strangerke | 2014-03-19 08:12:11 +0100 |
commit | b04f7c16935e63f35a46ffe9eec4e712c2b824c8 (patch) | |
tree | f3186a1a60f10f845e48a2951e4124a8bb326f54 /engines | |
parent | 829a099ad23e187db7cd79353d975d381d6c0338 (diff) | |
download | scummvm-rg350-b04f7c16935e63f35a46ffe9eec4e712c2b824c8.tar.gz scummvm-rg350-b04f7c16935e63f35a46ffe9eec4e712c2b824c8.tar.bz2 scummvm-rg350-b04f7c16935e63f35a46ffe9eec4e712c2b824c8.zip |
MADS: set public 2 inventory functions, fix signed/unsigned comparison
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/inventory.cpp | 2 | ||||
-rw-r--r-- | engines/mads/inventory.h | 23 |
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 |