aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-11-16 17:08:31 +0000
committerTorbjörn Andersson2006-11-16 17:08:31 +0000
commitdfe8d777c122fb1054d27747bb2d6810e4cca84a (patch)
tree66ecb9be1e92e15865f389a86071aa232548bda4
parentf93c693ab9d45f55ed047e3a566a2fc1e11f70f3 (diff)
downloadscummvm-rg350-dfe8d777c122fb1054d27747bb2d6810e4cca84a.tar.gz
scummvm-rg350-dfe8d777c122fb1054d27747bb2d6810e4cca84a.tar.bz2
scummvm-rg350-dfe8d777c122fb1054d27747bb2d6810e4cca84a.zip
Applied my own patch #1594924 to work around bug #1324106 ("MI2 VGA: Music as
Rapp is instantiating isn't synchronized"). I don't know if our timing is off, or if it's just a case of overly optimistic scripting, but the pause / unpause music instructions are issued in the wrong order. svn-id: r24726
-rw-r--r--engines/scumm/imuse/imuse.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index b8cd7b9fac..c3118036ef 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -960,6 +960,8 @@ void IMuseInternal::handle_marker(uint id, byte data) {
_trigger_count--;
_queue_cleared = false;
do {
+ bool skip_cmd = false;
+
pos = (pos + 1) % ARRAYSIZE(_cmd_queue);
if (_queue_pos == pos)
break;
@@ -968,7 +970,29 @@ void IMuseInternal::handle_marker(uint id, byte data) {
break;
_queue_end = pos;
- doCommand_internal(p[0], p[1], p[2], p[3], p[4], p[5], p[6], 0);
+ // WORKAROUND for bug #1324106. When playing the "flourishes"
+ // as Rapp's body appears from his ashes, MI2 sets up a trigger
+ // to pause the music, in case the animation plays too slowly,
+ // and then the music is manually unpaused for the next part of
+ // the animation.
+ //
+ // However, with ScummVM the animation finishes slightly too
+ // quickly instead, and the pause command is run *after* the
+ // unpause, so the whole thing is thrown out of sync. I think
+ // we can assume that any platform running ScummVM is fast
+ // enough to keep up with the animation here, so ignore the
+ // pause command.
+ //
+ // Since setting up a trigger is a multi-step operation (first
+ // the trigger, and then the commands), it's probably easiest
+ // to catch it here.
+
+ if (_game_id == GID_MONKEY2 && p[0] == 262 && p[1] == 183 && p[2] == 0) {
+ skip_cmd = true;
+ }
+
+ if (!skip_cmd)
+ doCommand_internal(p[0], p[1], p[2], p[3], p[4], p[5], p[6], 0);
if (_queue_cleared)
return;