Ticket #2438: nicer-workaround.diff

File nicer-workaround.diff, 1.1 KB (added by eriktorbjorn, 16 years ago)

Another possible, and much nicer, workaround

  • scumm/script_v6.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
    retrieving revision 1.460
    diff -u -r1.460 script_v6.cpp
     
    22542254        int num = getStackList(list, ARRAYSIZE(list));
    22552255
    22562256        _sound->soundKludge(list, num);
     2257
     2258        // WORKAROUND for bug #1398195: The room-11-2016 script contains a
     2259        // slight bug causing it to busy-wait for a sound to finish. Even under
     2260        // the best of circumstances, this will cause the game to hang briefly.
     2261        // On platforms where threading is cooperative, it will cause the game
     2262        // to hang indefinitely. We identify the buggy part of the script by
     2263        // looking for a soundKludge() opcode immediately followed by a jump.
     2264
     2265        if (_gameId == GID_CMI && _roomResource == 11 && vm.slot[_currentScript].number == 2016 && *_scriptPointer == 0x66) {
     2266                debug(3, "Working around script bug in room-11-2016");
     2267                o6_breakHere();
     2268        }
    22572269}
    22582270
    22592271void ScummEngine_v6::o6_isAnyOf() {