mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
Kernel function 0x26 is empty in SCI1.1 games, and it has been set to kPortrait in KQ6CD only
svn-id: r46585
This commit is contained in:
parent
0de0abb5d3
commit
4f02900890
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
/**
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user