[Scummvm-cvs-logs] SF.net SVN: scummvm:[44160] scummvm/trunk/engines/sci/engine/kernel.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Sep 17 16:53:57 CEST 2009


Revision: 44160
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44160&view=rev
Author:   fingolfin
Date:     2009-09-17 14:53:57 +0000 (Thu, 17 Sep 2009)

Log Message:
-----------
SCI: Properly hook up (I hope) CantBeHere instead of CanBeHere in SCI versions that need it

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.cpp

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-09-17 14:53:42 UTC (rev 44159)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-09-17 14:53:57 UTC (rev 44160)
@@ -564,7 +564,7 @@
 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 @@
 		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 @@
 	} // 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 @@
 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:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list