[Scummvm-cvs-logs] SF.net SVN: scummvm:[46585] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Dec 26 14:53:59 CET 2009
Revision: 46585
http://scummvm.svn.sourceforge.net/scummvm/?rev=46585&view=rev
Author: thebluegr
Date: 2009-12-26 13:53:59 +0000 (Sat, 26 Dec 2009)
Log Message:
-----------
Kernel function 0x26 is empty in SCI1.1 games, and it has been set to kPortrait in KQ6CD only
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/sci.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2009-12-26 13:50:52 UTC (rev 46584)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2009-12-26 13:53:59 UTC (rev 46585)
@@ -377,11 +377,11 @@
{NULL, NULL, NULL} // Terminator
};
-Kernel::Kernel(ResourceManager *resMan) : _resMan(resMan) {
+Kernel::Kernel(ResourceManager *resMan, Common::String gameName) : _resMan(resMan) {
loadSelectorNames();
mapSelectors(); // Map a few special selectors for later use
- loadKernelNames();
+ loadKernelNames(gameName);
mapFunctions(); // Map the kernel functions
}
@@ -713,7 +713,7 @@
}
}
-void Kernel::setDefaultKernelNames() {
+void Kernel::setDefaultKernelNames(Common::String gameName) {
_kernelNames = Common::StringList(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR);
// Some (later) SCI versions replaced CanBeHere by CantBeHere
@@ -745,7 +745,12 @@
break;
case SCI_VERSION_1_1:
- _kernelNames[0x26] = "Portrait";
+ // In SCI1.1, this kernel function is empty, apart from KQ6CD,
+ // where it has been replaced with kPortrait
+ if (gameName == "kq6")
+ _kernelNames[0x26] = "Portrait";
+ else
+ _kernelNames[0x26] = "Dummy";
_kernelNames[0x71] = "PalVary";
_kernelNames[0x7c] = "Message";
break;
@@ -756,7 +761,7 @@
}
}
-bool Kernel::loadKernelNames() {
+bool Kernel::loadKernelNames(Common::String gameName) {
_kernelNames.clear();
#ifdef ENABLE_SCI32
@@ -766,7 +771,7 @@
setKernelNamesSci2();
else
#endif
- setDefaultKernelNames();
+ setDefaultKernelNames(gameName);
return true;
}
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2009-12-26 13:50:52 UTC (rev 46584)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2009-12-26 13:53:59 UTC (rev 46585)
@@ -61,7 +61,7 @@
/**
* Initializes the SCI kernel
*/
- Kernel(ResourceManager *resMan);
+ Kernel(ResourceManager *resMan, Common::String gameName);
~Kernel();
uint getSelectorNamesSize() const;
@@ -95,12 +95,12 @@
* name table of the resource (the format changed between version 0 and 1).
* @return true on success, false on failure
*/
- bool loadKernelNames();
+ bool loadKernelNames(Common::String gameName);
/**
* Sets the default kernel function names, based on the SCI version used
*/
- void setDefaultKernelNames();
+ void setDefaultKernelNames(Common::String gameName);
#ifdef ENABLE_SCI32
/**
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2009-12-26 13:50:52 UTC (rev 46584)
+++ scummvm/trunk/engines/sci/sci.cpp 2009-12-26 13:53:59 UTC (rev 46585)
@@ -135,7 +135,7 @@
// Create debugger console. It requires GFX to be initialized
_console = new Console(this);
- _kernel = new Kernel(_resMan);
+ _kernel = new Kernel(_resMan, getGameID());
_vocabulary = new Vocabulary(_resMan);
_audio = new AudioPlayer(_resMan);
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