From e01afb0bd4b80c387a6170ee45a74ad684038b49 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 5 Jan 2006 07:06:47 +0000 Subject: Initial support for sound code in HE games. Split HE sound functions into separate file. svn-id: r19909 --- scumm/script_v72he.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scumm/script_v72he.cpp') diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index bc8fbbcfab..516827daca 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -868,9 +868,7 @@ void ScummEngine_v72he::o72_getTimer() { int cmd = fetchScriptByte(); if (cmd == 10 || cmd == 50) { - checkRange(3, 1, timer, "o72_getTimer: Timer %d out of range(%d)"); - int diff = _system->getMillis() - _timers[timer]; - push(diff); + push(getHETimer(timer)); } else { push(0); } @@ -881,8 +879,7 @@ void ScummEngine_v72he::o72_setTimer() { int cmd = fetchScriptByte(); if (cmd == 158 || cmd == 61) { - checkRange(3, 1, timer, "o72_setTimer: Timer %d out of range(%d)"); - _timers[timer] = _system->getMillis(); + setHETimer(timer); } else { error("TIMER command %d?", cmd); } @@ -890,8 +887,7 @@ void ScummEngine_v72he::o72_setTimer() { void ScummEngine_v72he::o72_getSoundPosition() { int snd = pop(); - push(_sound->getSoundElapsedTime(snd) * 10); - debug(1,"o72_getSoundPosition (%d)", snd); + push(_sound->getSoundPos(snd)); } void ScummEngine_v72he::o72_startScript() { -- cgit v1.2.3