diff options
-rw-r--r-- | engines/kyra/kyra_v3.h | 3 | ||||
-rw-r--r-- | engines/kyra/script_v3.cpp | 25 |
2 files changed, 25 insertions, 3 deletions
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h index 2967a9e18d..13214062ec 100644 --- a/engines/kyra/kyra_v3.h +++ b/engines/kyra/kyra_v3.h @@ -743,6 +743,9 @@ private: int o3_getHiddenItemsEntry(ScriptState *script); int o3_setupSceneAnimObject(ScriptState *script); int o3_removeSceneAnimObject(ScriptState *script); + int o3_disableTimer(ScriptState *script); + int o3_enableTimer(ScriptState *script); + int o3_setTimerCountdown(ScriptState *script); int o3_setVocHigh(ScriptState *script); int o3_getVocHigh(ScriptState *script); int o3_dummy(ScriptState *script); diff --git a/engines/kyra/script_v3.cpp b/engines/kyra/script_v3.cpp index 349e0ab237..881fee2c56 100644 --- a/engines/kyra/script_v3.cpp +++ b/engines/kyra/script_v3.cpp @@ -27,6 +27,7 @@ #include "kyra/script.h" #include "kyra/screen_v3.h" #include "kyra/wsamovie.h" +#include "kyra/timer.h" #include "common/endian.h" @@ -1040,6 +1041,24 @@ int KyraEngine_v3::o3_removeSceneAnimObject(ScriptState *script) { return 0; } +int KyraEngine_v3::o3_disableTimer(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_disableTimer(%p) (%d)", (const void *)script, stackPos(0)); + _timer->disable(stackPos(0)); + return 0; +} + +int KyraEngine_v3::o3_enableTimer(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_enableTimer(%p) (%d)", (const void *)script, stackPos(0)); + _timer->enable(stackPos(0)); + return 0; +} + +int KyraEngine_v3::o3_setTimerCountdown(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setTimerCountdown(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _timer->setCountdown(stackPos(0), stackPos(1)); + return 0; +} + int KyraEngine_v3::o3_setVocHigh(ScriptState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v3::o3_setVocHigh(%p) (%d)", (const void *)script, stackPos(0)); _vocHigh = stackPos(0); @@ -1319,9 +1338,9 @@ void KyraEngine_v3::setupOpcodeTable() { Opcode(o3_setupSceneAnimObject); Opcode(o3_removeSceneAnimObject); // 0x9c - OpcodeUnImpl(); - OpcodeUnImpl(); - OpcodeUnImpl(); + Opcode(o3_disableTimer); + Opcode(o3_enableTimer); + Opcode(o3_setTimerCountdown); OpcodeUnImpl(); // 0xa0 Opcode(o3_dummy); |