aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/script_v2.cpp')
-rw-r--r--engines/kyra/script_v2.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 77efc780a7..8bd4bb9df7 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -456,6 +456,13 @@ int KyraEngine_v2::o2_checkForItem(ScriptState *script) {
return findItem(stackPos(0), stackPos(1)) == -1 ? 0 : 1;
}
+int KyraEngine_v2::o2_loadSoundFile(ScriptState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
+ if (_sound->hasTrack(stackPos(0)))
+ snd_playTheme(stackPos(0));
+ return 0;
+}
+
int KyraEngine_v2::o2_removeItemSlotFromInventory(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_removeItemSlotFromInventory(%p) (%d)", (const void *)script, stackPos(0));
removeItemFromInventory(stackPos(0));
@@ -1839,7 +1846,7 @@ void KyraEngine_v2::setupOpcodeTable() {
OpcodeUnImpl(),
// 0x20
Opcode(o2_checkForItem),
- OpcodeUnImpl(),
+ Opcode(o2_loadSoundFile),
Opcode(o2_removeItemSlotFromInventory),
Opcode(o2_defineItem),
// 0x24