WORKAROUND for bug #985948 (INDY3VGA: Lockup during conversation with drunken nazi)

svn-id: r14448
This commit is contained in:
Max Horn 2004-08-02 20:55:35 +00:00
parent 4289da7d3e
commit 8585d77d34
2 changed files with 15 additions and 0 deletions

View File

@ -1059,6 +1059,12 @@ int ScummEngine::resStrLen(const byte *src) const {
chr = *src++;
num++;
// WORKAROUND for bug #985948, a script bug in Indy3. See also
// the corresponding code in ScummEngine::addMessageToStack().
if (_gameId == GID_INDY3 && chr == 0x2E) {
continue;
}
if (chr != 1 && chr != 2 && chr != 3 && chr != 8) {
if (_version == 8) {
src += 4;

View File

@ -468,6 +468,15 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) {
break;
if (chr == 0xFF) {
chr = src[num++];
// WORKAROUND for bug #985948, a script bug in Indy3. Apparently,
// a german 'sz' was encoded incorrectly as 0xFF2E. We replace
// this by the correct encoding here. See also ScummEngine::resStrLen().
if (_gameId == GID_INDY3 && chr == 0x2E) {
*dst++ = 0xE1;
continue;
}
if (chr == 1 || chr == 2 || chr == 3 || chr == 8) {
// Simply copy these special codes
*dst++ = 0xFF;