aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-09-17 14:53:57 +0000
committerMax Horn2009-09-17 14:53:57 +0000
commite3e1c0754f09753ce3a35b0dd6bbd52734a195ec (patch)
tree7f2a7dfa3eff221216ae6f900f07fce74ae8e42c /engines
parent15652675b29388060d4c6a44025997fb64360bcc (diff)
downloadscummvm-rg350-e3e1c0754f09753ce3a35b0dd6bbd52734a195ec.tar.gz
scummvm-rg350-e3e1c0754f09753ce3a35b0dd6bbd52734a195ec.tar.bz2
scummvm-rg350-e3e1c0754f09753ce3a35b0dd6bbd52734a195ec.zip
SCI: Properly hook up (I hope) CantBeHere instead of CanBeHere in SCI versions that need it
svn-id: r44160
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index b61df148e8..812b12a456 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -564,7 +564,7 @@ static void kernel_compile_signature(const char **s) {
void Kernel::mapFunctions() {
int mapped = 0;
int ignored = 0;
- uint functions_nr = getKernelNamesSize();
+ uint functions_nr = _kernelNames.size();
_kernelFuncs.resize(functions_nr);
@@ -572,9 +572,7 @@ void Kernel::mapFunctions() {
int found = -1;
// First, get the name, if known, of the kernel function with number functnr
- Common::String sought_name;
- if (functnr < getKernelNamesSize())
- sought_name = getKernelName(functnr);
+ Common::String sought_name = _kernelNames[functnr];
// Reset the table entry
_kernelFuncs[functnr].fun = NULL;
@@ -613,7 +611,7 @@ void Kernel::mapFunctions() {
} // for all functions requesting to be mapped
debugC(2, kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.\n",
- mapped + ignored, getKernelNamesSize(), mapped, ignored);
+ mapped + ignored, _kernelNames.size(), mapped, ignored);
return;
}
@@ -721,6 +719,10 @@ bool kernel_matches_signature(SegManager *segMan, const char *sig, int argc, con
void Kernel::setDefaultKernelNames() {
_kernelNames = Common::StringList(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR);
+ // Some (later) SCI versions replaced CanBeHere by CantBeHere
+ if (_selectorCache.cantBeHere != -1)
+ _kernelNames[0x4d] = "CantBeHere";
+
switch (_resMan->sciVersion()) {
case SCI_VERSION_0_EARLY:
case SCI_VERSION_0_LATE: