diff options
author | Martin Kiewitz | 2010-07-11 21:03:23 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-11 21:03:23 +0000 |
commit | 115d7d0132bd410f2e1f235740c3ead61de9458d (patch) | |
tree | 68168d5ba149a10f73c7d5fed0fb67b95f2d3f8c /engines | |
parent | a94b25f99cc29700770089982850eab9d11a3d87 (diff) | |
download | scummvm-rg350-115d7d0132bd410f2e1f235740c3ead61de9458d.tar.gz scummvm-rg350-115d7d0132bd410f2e1f235740c3ead61de9458d.tar.bz2 scummvm-rg350-115d7d0132bd410f2e1f235740c3ead61de9458d.zip |
SCI: fix signature loading for subops, fixes kq6 signature mismatch
svn-id: r50807
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 9006c6a646..a72c070d33 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -1180,27 +1180,29 @@ void Kernel::mapFunctions() { if ((kernelSubMap->fromVersion == SCI_VERSION_NONE) || (kernelSubMap->fromVersion <= mySubVersion)) if ((kernelSubMap->toVersion == SCI_VERSION_NONE) || (kernelSubMap->toVersion >= mySubVersion)) { uint subId = kernelSubMap->id; - subFunctions[subId].function = kernelSubMap->function; - subFunctions[subId].name = kernelSubMap->name; - subFunctions[subId].workarounds = kernelSubMap->workarounds; - if (kernelSubMap->signature) { - subFunctions[subId].signature = parseKernelSignature(kernelSubMap->name, kernelSubMap->signature); - } else { - // we go back the submap to find the previous signature for that kernel call - const SciKernelMapSubEntry *kernelSubMapBack = kernelSubMap; - uint kernelSubLeft = kernelSubNr; - while (kernelSubLeft) { - kernelSubLeft--; - kernelSubMapBack--; - if (kernelSubMapBack->name == kernelSubMap->name) { - if (kernelSubMapBack->signature) { - subFunctions[subId].signature = parseKernelSignature(kernelSubMap->name, kernelSubMapBack->signature); - break; + if (!subFunctions[subId].function) { + subFunctions[subId].function = kernelSubMap->function; + subFunctions[subId].name = kernelSubMap->name; + subFunctions[subId].workarounds = kernelSubMap->workarounds; + if (kernelSubMap->signature) { + subFunctions[subId].signature = parseKernelSignature(kernelSubMap->name, kernelSubMap->signature); + } else { + // we go back the submap to find the previous signature for that kernel call + const SciKernelMapSubEntry *kernelSubMapBack = kernelSubMap; + uint kernelSubLeft = kernelSubNr; + while (kernelSubLeft) { + kernelSubLeft--; + kernelSubMapBack--; + if (kernelSubMapBack->name == kernelSubMap->name) { + if (kernelSubMapBack->signature) { + subFunctions[subId].signature = parseKernelSignature(kernelSubMap->name, kernelSubMapBack->signature); + break; + } } } + if (!subFunctions[subId].signature) + error("k%s: no previous signatures", kernelSubMap->name); } - if (!subFunctions[subId].signature) - error("k%s: no previous signatures", kernelSubMap->name); } } kernelSubMap++; |