aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v72he.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-08-26 14:28:42 +0000
committerTravis Howell2004-08-26 14:28:42 +0000
commitf6eae9d1a1beeca56667ad40047a1cbac7b91f83 (patch)
treec855faf31d65b452dbe85fadf162227fbef82a83 /scumm/script_v72he.cpp
parent5805529c2c1d33df8fcf1800a20a4f2f57e98dde (diff)
downloadscummvm-rg350-f6eae9d1a1beeca56667ad40047a1cbac7b91f83.tar.gz
scummvm-rg350-f6eae9d1a1beeca56667ad40047a1cbac7b91f83.tar.bz2
scummvm-rg350-f6eae9d1a1beeca56667ad40047a1cbac7b91f83.zip
Update akos error messages
Add proper timer opcodes Up some debug msgs. svn-id: r14779
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r--scumm/script_v72he.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index f0194a5cfc..1932298b24 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -605,21 +605,28 @@ void ScummEngine_v72he::o72_objectY() {
}
void ScummEngine_v72he::o72_getTimer() {
- int b = pop();
- int a = fetchScriptByte();
- warning("o72_getTimer stub (%d, %d)", b, a);
- if (a == 10)
- push(1);
- else
+ int timer = pop();
+ int cmd = fetchScriptByte();
+
+ if (cmd == 10) {
+ checkRange(3, 1, timer, "o72_getTimer: Timer %d out of range(%d)");
+ int diff = _system->get_msecs() - _timers[timer];
+ push(diff);
+ } else {
push(0);
+ }
}
void ScummEngine_v72he::o72_setTimer() {
- int b = pop();
- int a = fetchScriptByte();
- if (a != 158)
- error("TIMER command %d?", a);
- warning("o72_setTimer stub (%d, %d)", b, a);
+ int timer = pop();
+ int cmd = fetchScriptByte();
+
+ if (cmd == 158) {
+ checkRange(3, 1, timer, "o72_setTimer: Timer %d out of range(%d)");
+ _timers[timer] = _system->get_msecs();
+ } else {
+ error("TIMER command %d?", cmd);
+ }
}
void ScummEngine_v72he::o72_wordArrayDec() {