aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-25 17:36:43 +0000
committerJohannes Schickel2008-04-25 17:36:43 +0000
commit2479b03fbf94d6e565d3e83d5c70857ef02805e0 (patch)
tree377a6c7777384b8c3156eeff997f3874e5475a96
parent66518b5be01b23195ae7a2e683ff3d27defcb231 (diff)
downloadscummvm-rg350-2479b03fbf94d6e565d3e83d5c70857ef02805e0.tar.gz
scummvm-rg350-2479b03fbf94d6e565d3e83d5c70857ef02805e0.tar.bz2
scummvm-rg350-2479b03fbf94d6e565d3e83d5c70857ef02805e0.zip
Implemented opcodes:
- 156: o3_disableTimer - 157: o3_enableTimer - 158: o3_setTimerCountdown svn-id: r31725
-rw-r--r--engines/kyra/kyra_v3.h3
-rw-r--r--engines/kyra/script_v3.cpp25
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);