aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-07-01 20:16:42 +0000
committerFilippos Karapetis2010-07-01 20:16:42 +0000
commitfa014867cfe6bde10467761e1241b646ecb0460f (patch)
tree380eb31bc8709fed89e2fb2f5974381feb37c14f
parent1a675dcd86d7d3d3cae97c7e7b1bc81555af93f1 (diff)
downloadscummvm-rg350-fa014867cfe6bde10467761e1241b646ecb0460f.tar.gz
scummvm-rg350-fa014867cfe6bde10467761e1241b646ecb0460f.tar.bz2
scummvm-rg350-fa014867cfe6bde10467761e1241b646ecb0460f.zip
SCI: Mark the ShiftScreen, ListOps and ATan SCI1 kernel functions as unused (dummy) - we haven't seen them being used anywhere. Added a check and an error in case a kernel function which is considered to be unused is called.
svn-id: r50567
-rw-r--r--engines/sci/engine/kernel.cpp17
-rw-r--r--engines/sci/engine/vm.cpp5
2 files changed, 8 insertions, 14 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index b0c369605e..58619986cb 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -170,18 +170,18 @@ static const char *s_defaultKernelNames[] = {
/*0x6c*/ "Graph",
/*0x6d*/ "Joystick",
// End of kernel function table for SCI0
- /*0x6e*/ "ShiftScreen",
+ /*0x6e*/ "Dummy", // ShiftScreen
/*0x6f*/ "Palette",
/*0x70*/ "MemorySegment",
/*0x71*/ "Intersections", // MoveCursor (SCI1 late), PalVary (SCI1.1)
/*0x72*/ "Memory",
- /*0x73*/ "ListOps",
+ /*0x73*/ "Dummy", // ListOps
/*0x74*/ "FileIO",
/*0x75*/ "DoAudio",
/*0x76*/ "DoSync",
/*0x77*/ "AvoidPath",
/*0x78*/ "Sort", // StrSplit (SCI01)
- /*0x79*/ "ATan",
+ /*0x79*/ "Dummy", // ATan
/*0x7a*/ "Lock",
/*0x7b*/ "StrSplit",
/*0x7c*/ "GetMessage", // Message (SCI1.1)
@@ -429,17 +429,6 @@ static SciKernelMapEntry s_kernelMap[] = {
#endif
};
-#if 0
- // Stub functions
- /*09*/ { "Show", kShow, "i" },
- { "ShiftScreen", kShiftScreen, ".*" },
- { "ListOps", kListOps, ".*" },
- { "ATan", kATan, ".*" },
- { "Record", kRecord, ".*" },
- { "PlayBack", kPlayBack, ".*" },
- { "DbugStr", kDbugStr, ".*" },
-#endif
-
Kernel::Kernel(ResourceManager *resMan, SegManager *segMan)
: _resMan(resMan), _segMan(segMan), _invalid("<invalid>") {
loadSelectorNames();
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 32aad38880..49049585ee 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -852,6 +852,11 @@ static void callKernelFunc(EngineState *s, int kernelFuncNr, int argc) {
}
warning("%s", warningMsg.c_str());
+
+ // Make sure that the game doesn't call a function that is considered unused. If
+ // that happens, error out.
+ if (kernelCall.origName == "Dummy")
+ error("Kernel function %d was called, which was considered to be unused", kernelFuncNr);
}
}