aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/gui_v2.cpp')
-rw-r--r--engines/kyra/gui_v2.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 75603d623e..6cfdf67290 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -650,6 +650,14 @@ int KyraEngine_v2::getInventoryItemSlot(uint16 item) {
return -1;
}
+int KyraEngine_v2::findFreeVisibleInventorySlot() {
+ for (int i = 0; i < 10; ++i) {
+ if (_mainCharacter.inventory[i] == 0xFFFF)
+ return i;
+ }
+ return -1;
+}
+
void KyraEngine_v2::removeItemFromInventory(int slot) {
_mainCharacter.inventory[slot] = 0xFFFF;
if (slot < 10) {