aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra_v2.h1
-rw-r--r--engines/kyra/script_v2.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 382ef91388..e839d7869e 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -970,6 +970,7 @@ protected:
int o2_displayWsaSequence(ScriptState *script);
int o2_addItemToCurScene(ScriptState *script);
int o2_checkForItem(ScriptState *script);
+ int o2_removeItemSlotFromInventory(ScriptState *script);
int o2_defineItem(ScriptState *script);
int o2_removeItemFromInventory(ScriptState *script);
int o2_countItemInInventory(ScriptState *script);
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 5f9a62d678..5ac9531db1 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -351,6 +351,12 @@ int KyraEngine_v2::o2_checkForItem(ScriptState *script) {
return findItem(stackPos(0), stackPos(1)) == -1 ? 0 : 1;
}
+int KyraEngine_v2::o2_removeItemSlotFromInventory(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "o2_removeItemSlotFromInventory(%p) (%d)", (const void *)script, stackPos(0));
+ removeItemFromInventory(stackPos(0));
+ return 0;
+}
+
int KyraEngine_v2::o2_defineItem(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_defineItem(%p) (%d, %d, %d, %d)", (const void *)script,
stackPos(0), stackPos(1), stackPos(2), stackPos(3));
@@ -1393,7 +1399,7 @@ void KyraEngine_v2::setupOpcodeTable() {
// 0x20
Opcode(o2_checkForItem),
OpcodeUnImpl(),
- OpcodeUnImpl(),
+ Opcode(o2_removeItemSlotFromInventory),
Opcode(o2_defineItem),
// 0x24
Opcode(o2_removeItemFromInventory),