diff options
author | Max Horn | 2007-02-02 13:53:59 +0000 |
---|---|---|
committer | Max Horn | 2007-02-02 13:53:59 +0000 |
commit | 013f1711c48edcebc3215fb5cfd1aaf1a796701a (patch) | |
tree | 7d2606cc41276a5f0153d5088a8482c84d15fdcc /engines/scumm | |
parent | 11a8d8f265b92c71a27a5e9a123d0e4c148cb4e0 (diff) | |
download | scummvm-rg350-013f1711c48edcebc3215fb5cfd1aaf1a796701a.tar.gz scummvm-rg350-013f1711c48edcebc3215fb5cfd1aaf1a796701a.tar.bz2 scummvm-rg350-013f1711c48edcebc3215fb5cfd1aaf1a796701a.zip |
Workaround for bug #1621210 (FOA: Kerner counts incorrectly during end sequence)
svn-id: r25335
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/script_v5.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 2f2374f722..c126d40131 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -2758,15 +2758,30 @@ void ScummEngine_v5::decodeParseString() { } } break; - case 15: // SO_TEXTSTRING - // WORKAROUND: This happens when Chaos introduces - // herself to bishop Mandible. Of all the places to put - // a typo... - if (_game.id == GID_LOOM && strcmp((const char *) _scriptPointer, "I am Choas.") == 0) - printString(textSlot, (const byte *) "I am Chaos."); - else - printString(textSlot, _scriptPointer); - _scriptPointer += resStrLen(_scriptPointer) + 1; + case 15:{ // SO_TEXTSTRING + const int len = resStrLen(_scriptPointer); + + if (_game.id == GID_LOOM && strcmp((const char *) _scriptPointer, "I am Choas.") == 0) { + // WORKAROUND: This happens when Chaos introduces + // herself to bishop Mandible. Of all the places to put + // a typo... + printString(textSlot, (const byte *) "I am Chaos."); + } else if (_game.id == GID_INDY4 && _roomResource == 23 && vm.slot[_currentScript].number == 167 && + len == 24 && 0==memcmp(_scriptPointer+16, "pregod", 6)) { + // WORKAROUND for bug #1621210. + byte tmpBuf[25]; + memcpy(tmpBuf, _scriptPointer, 25); + if (tmpBuf[22] == '8') + strcpy((char *)tmpBuf+16, "^18^"); + else + strcpy((char *)tmpBuf+16, "^19^"); + printf("evil workaround active"); + printString(textSlot, tmpBuf); + } else { + printString(textSlot, _scriptPointer); + } + _scriptPointer += len + 1; + } // In SCUMM V1-V3, there were no 'default' values for the text slot |