diff options
author | Filippos Karapetis | 2011-01-04 23:11:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-01-04 23:11:19 +0000 |
commit | f2234f8ee369d701467e723a92ac15be3a1ae534 (patch) | |
tree | 920e21775573a4b65fc74a31e1f9dfe5b3f83244 /engines/sci | |
parent | 11780744c296e997178791755204363d08c6f68a (diff) | |
download | scummvm-rg350-f2234f8ee369d701467e723a92ac15be3a1ae534.tar.gz scummvm-rg350-f2234f8ee369d701467e723a92ac15be3a1ae534.tar.bz2 scummvm-rg350-f2234f8ee369d701467e723a92ac15be3a1ae534.zip |
SCI: Fixed part of bug #3150767 - "KQ5 French crash on startup, only partial English text"
This is a regression from r54510
svn-id: r55122
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/script.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 1382df36a2..b6b9fe81d4 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -588,8 +588,20 @@ void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) { if (pass == 2) { if (!obj->initBaseObject(segMan, addr)) { - error("Failed to locate base object for object at %04X:%04X", PRINT_REG(addr)); - //scriptObjRemove(addr); + if ((_nr == 202 || _nr == 764) && g_sci->getGameId() == GID_KQ5) { + // WORKAROUND: Script 202 of KQ5 French and German + // (perhaps Spanish too?) has an invalid object. + // This is non-fatal. Refer to bugs #3035396 and + // #3150767. + // Same happens with script 764, it seems to + // contain junk towards its end. + if (getSciVersion() < SCI_VERSION_1_1) + addr.offset += 8; + + _objects.erase(addr.toUint16()); + } else { + error("Failed to locate base object for object at %04X:%04X", PRINT_REG(addr)); + } } } } |