mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 22:07:34 +00:00
MADS: set public 2 inventory functions, fix signed/unsigned comparison
This commit is contained in:
parent
829a099ad2
commit
b04f7c1693
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user