diff options
author | Filippos Karapetis | 2009-12-26 13:53:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-26 13:53:59 +0000 |
commit | 4f02900890297801c555b1fbd000f26690c37011 (patch) | |
tree | 3815ec67e356163b2e8e15360e3e75aaff170d33 /engines | |
parent | 0de0abb5d34575ebcb3cbf3d58357f17fc00ff96 (diff) | |
download | scummvm-rg350-4f02900890297801c555b1fbd000f26690c37011.tar.gz scummvm-rg350-4f02900890297801c555b1fbd000f26690c37011.tar.bz2 scummvm-rg350-4f02900890297801c555b1fbd000f26690c37011.zip |
Kernel function 0x26 is empty in SCI1.1 games, and it has been set to kPortrait in KQ6CD only
svn-id: r46585
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 17 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 6 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 2 |
3 files changed, 15 insertions, 10 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index a35c518fdf..1a56c44c74 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -377,11 +377,11 @@ SciKernelFunction kfunct_mappers[] = { {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_sleep(SciEvent *event, uint32 msecs ) { } } -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 @@ void Kernel::setDefaultKernelNames() { 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 @@ void Kernel::setDefaultKernelNames() { } } -bool Kernel::loadKernelNames() { +bool Kernel::loadKernelNames(Common::String gameName) { _kernelNames.clear(); #ifdef ENABLE_SCI32 @@ -766,7 +771,7 @@ bool Kernel::loadKernelNames() { setKernelNamesSci2(); else #endif - setDefaultKernelNames(); + setDefaultKernelNames(gameName); return true; } diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index da66e8a5a4..fbfadf444a 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -61,7 +61,7 @@ public: /** * Initializes the SCI kernel */ - Kernel(ResourceManager *resMan); + Kernel(ResourceManager *resMan, Common::String gameName); ~Kernel(); uint getSelectorNamesSize() const; @@ -95,12 +95,12 @@ private: * 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 /** diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 04400df969..baf2be0edd 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -135,7 +135,7 @@ Common::Error SciEngine::run() { // 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); |