Ticket #8584: rapp-workaround.diff

File rapp-workaround.diff, 1.5 KB (added by eriktorbjorn, 14 years ago)

Patch against current SVN

  • engines/scumm/imuse/imuse.cpp

     
    960960        _trigger_count--;
    961961        _queue_cleared = false;
    962962        do {
     963                bool skip_cmd = false;
     964
    963965                pos = (pos + 1) % ARRAYSIZE(_cmd_queue);
    964966                if (_queue_pos == pos)
    965967                        break;
     
    968970                        break;
    969971                _queue_end = pos;
    970972
    971                 doCommand_internal(p[0], p[1], p[2], p[3], p[4], p[5], p[6], 0);
     973                // WORKAROUND for bug #1324106. When playing the "flourishes"
     974                // as Rapp's body appears from his ashes, MI2 sets up a trigger
     975                // to pause the music, in case the animation plays too slowly,
     976                // and then the music is manually unpaused for the next part of
     977                // the animation.
     978                //
     979                // However, with ScummVM the animation finishes slightly too
     980                // quickly instead, and the pause command is run *after* the
     981                // unpause, so the whole thing is thrown out of sync. I think
     982                // we can assume that any platform running ScummVM is fast
     983                // enough to keep up with the animation here, so ignore the
     984                // pause command.
     985                //
     986                // Since setting up a trigger is a multi-step operation (first
     987                // the trigger, and then the commands), it's probably easiest
     988                // to catch it here.
    972989
     990                if (_game_id == GID_MONKEY2 && p[0] == 262 && p[1] == 183 && p[2] == 0) {
     991                        skip_cmd = true;
     992                }
     993
     994                if (!skip_cmd)
     995                        doCommand_internal(p[0], p[1], p[2], p[3], p[4], p[5], p[6], 0);
     996
    973997                if (_queue_cleared)
    974998                        return;
    975999                pos = _queue_end;