diff options
author | Filippos Karapetis | 2010-11-24 11:57:11 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-24 11:57:11 +0000 |
commit | 7fc171e3bc84be94162288397af679d437e537b4 (patch) | |
tree | eb4aa3ba332d001c9ee6fe4f4d9cd45d84ad6f52 | |
parent | 332a438ccf0b2def3237f69661e836c7ed444d7a (diff) | |
download | scummvm-rg350-7fc171e3bc84be94162288397af679d437e537b4.tar.gz scummvm-rg350-7fc171e3bc84be94162288397af679d437e537b4.tar.bz2 scummvm-rg350-7fc171e3bc84be94162288397af679d437e537b4.zip |
SCI: Some slight changes to get the "find_callk" console command working in KQ5
- Ignore invalid object in KQ5 script 784
- Script 980 looks to be an unused leftover, as its object contain references to
classes placed in script 988, which is missing
svn-id: r54455
-rw-r--r-- | engines/sci/console.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/script.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 409abb6298..7dfafba8ae 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -2749,6 +2749,13 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) { SegManager *segMan = _engine->getEngineState()->_segMan; while (itr != resources->end()) { + if (_engine->getGameId() == GID_KQ5 && itr->getNumber() == 980) { + // Ignore script 980 in KQ5. Seems to be a leftover, as it + // uses a superclass from script 988, which doesn't exist + itr++; + continue; + } + // Load script scriptSegment = segMan->instantiateScript(itr->getNumber()); script = segMan->getScript(scriptSegment); diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 5fe2f289b6..ec64e1bfa1 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -596,10 +596,11 @@ void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) { obj->initSpecies(segMan, addr); if (!obj->initBaseObject(segMan, addr)) { - if (_nr == 202 && g_sci->getGameId() == GID_KQ5) { + 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 bug #3035396. + // Same happens with script 764, it seems to contain junk towards its end } else { error("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr)); } |