aboutsummaryrefslogtreecommitdiff
path: root/script_v1.cpp
diff options
context:
space:
mode:
authorJames Brown2002-03-18 11:50:09 +0000
committerJames Brown2002-03-18 11:50:09 +0000
commitac19e7001a5a5a3355bfc1473350b25b4ee1ab03 (patch)
tree3331d25fdc40396fcba6e8751f67a9ca21f1df05 /script_v1.cpp
parent32186f8614700f979f2f3e80c8e19263e25c6e51 (diff)
downloadscummvm-rg350-ac19e7001a5a5a3355bfc1473350b25b4ee1ab03.tar.gz
scummvm-rg350-ac19e7001a5a5a3355bfc1473350b25b4ee1ab03.tar.bz2
scummvm-rg350-ac19e7001a5a5a3355bfc1473350b25b4ee1ab03.zip
Do some stuff to fix loom cd-music syncro. Sequences now run without 'speeding' by.. but they are still slightly out of sync.
svn-id: r3781
Diffstat (limited to 'script_v1.cpp')
-rw-r--r--script_v1.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/script_v1.cpp b/script_v1.cpp
index 670a5e33af..0218d32226 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -22,6 +22,7 @@
#include "stdafx.h"
#include "scumm.h"
+#include "cdmusic.h"
void Scumm::setupOpcodes() {
static const OpcodeProc opcode_list[] = {
@@ -2450,14 +2451,16 @@ void Scumm::decodeParseString() {
case 7: /* overhead */
string[textSlot].overhead = true;
break;
- case 8: { /* play loom talkie sound - use in other games ? */
- int offset = getVarOrDirectWord(0x80);
- int delay = getVarOrDirectWord(0x40);
-
- if (_gameId == GID_LOOM256)
- cd_playtrack(1, offset, delay);
- break;
- }
+ case 8: { /* play loom talkie sound - use in other games ? */
+ int offset = (int)(getVarOrDirectWord(0x80) * 7.5 - 22650);
+ int delay = (int)(getVarOrDirectWord(0x40) * 7.5) + 10;
+
+ if (_gameId == GID_LOOM256)
+ cd_play(1, 0, offset, delay);
+ else
+ warning("parseString: 8");
+ }
+ break;
case 15:
_messagePtr = _scriptPointer;
switch(textSlot) {