aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-11 07:47:57 +0000
committerFilippos Karapetis2010-06-11 07:47:57 +0000
commit377cfe6fefe6a817a6ce778e7721dc3818780c01 (patch)
treecf98bf0853835a81d561dc786105a20cf1ce45ac /engines
parent5baa47a9cbd42b2b40b599928ea6bf41f47fdc18 (diff)
downloadscummvm-rg350-377cfe6fefe6a817a6ce778e7721dc3818780c01.tar.gz
scummvm-rg350-377cfe6fefe6a817a6ce778e7721dc3818780c01.tar.bz2
scummvm-rg350-377cfe6fefe6a817a6ce778e7721dc3818780c01.zip
Added a new kernel function, kEmpty, for really empty (not dummy, i.e. unimplemented) functions
svn-id: r49591
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp5
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kmisc.cpp8
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 829687f226..d418fb7998 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -357,6 +357,7 @@ SciKernelFunction kfunct_mappers[] = {
{ "TextColors", kTextColors, ".*" },
{ "TextFonts", kTextFonts, ".*" },
{ "Portrait", kPortrait, ".*" },
+ { "Empty", kEmpty, ".*" },
#ifdef ENABLE_SCI32
// SCI2 Kernel Functions
@@ -742,8 +743,8 @@ void Kernel::setDefaultKernelNames() {
break;
case SCI_VERSION_1_1:
- // In SCI1.1, kSetSynonyms is a dummy (empty) function
- _kernelNames[0x26] = "Dummy";
+ // In SCI1.1, kSetSynonyms is an empty function
+ _kernelNames[0x26] = "Empty";
// In the Windows version of KQ6 CD, the empty kSetSynonyms
// function has been replaced with kPortrait. In KQ6 Mac,
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 5cd044eadb..722473a85b 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -405,6 +405,7 @@ reg_t kStrSplit(EngineState *s, int argc, reg_t *argv);
reg_t kPlatform(EngineState *s, int argc, reg_t *argv);
reg_t kTextColors(EngineState *s, int argc, reg_t *argv);
reg_t kTextFonts(EngineState *s, int argc, reg_t *argv);
+reg_t kEmpty(EngineState *s, int argc, reg_t *argv);
#ifdef ENABLE_SCI32
// SCI2 Kernel Functions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index f3d4c8a732..d836ec4a7f 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -375,4 +375,12 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+reg_t kEmpty(EngineState *s, int argc, reg_t *argv) {
+ // Placeholder for empty kernel functions which are still called from the engine
+ // scripts (like the empty kSetSynonyms function in SCI1.1). This differs from
+ // dummy functions because it does nothing and never throws a warning when it's
+ // called
+ return s->r_acc;
+}
+
} // End of namespace Sci