aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-09-09 11:40:46 +0000
committerFilippos Karapetis2010-09-09 11:40:46 +0000
commitc3c36cc59b46d9ef4e57bd58279a89dd8b8d5e4f (patch)
tree02681b22b8db83fa7170661a1a2353f156b88d68 /engines
parent9c67db6b0d86b24e16d08c0dd53ec4e2d6b253f6 (diff)
downloadscummvm-rg350-c3c36cc59b46d9ef4e57bd58279a89dd8b8d5e4f.tar.gz
scummvm-rg350-c3c36cc59b46d9ef4e57bd58279a89dd8b8d5e4f.tar.bz2
scummvm-rg350-c3c36cc59b46d9ef4e57bd58279a89dd8b8d5e4f.zip
SCI: SCI2/2.1 kernel table changes
- Mark several SCI2/2.1 kernel functions used for debugging as dummy - Added an empty function for kSetWindowsOption, used for settings specific to Windows versions (e.g. showing/hiding the title bar) - Added a stub for kGetWindowsOption (currently returning 0 to a Windows related option for Phantasmagoria) svn-id: r52652
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h28
-rw-r--r--engines/sci/engine/kgraphics.cpp12
3 files changed, 28 insertions, 13 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index dedc836b32..4d8ed0bc0f 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -462,6 +462,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv);
reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv);
reg_t kCD(EngineState *s, int argc, reg_t *argv);
reg_t kAddPicAt(EngineState *s, int argc, reg_t *argv);
+reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv);
reg_t kAddBefore(EngineState *s, int argc, reg_t *argv);
reg_t kMoveToFront(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 18a222229b..54870733da 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -488,6 +488,8 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(Save), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(Text), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(AddPicAt), SIG_EVERYWHERE, "oiii", NULL, NULL },
+ { "SetWindowsOption", kEmpty, SIG_EVERYWHERE, "ii", NULL, NULL },
+ { MAP_CALL(GetWindowsOption), SIG_EVERYWHERE, "i", NULL, NULL },
{ NULL, NULL, SIG_EVERYWHERE, NULL, NULL, NULL }
#endif
};
@@ -758,13 +760,13 @@ static const char *sci2_default_knames[] = {
/*0x70*/ "InPolygon",
/*0x71*/ "MergePoly",
/*0x72*/ "SetDebug",
- /*0x73*/ "InspectObject",
+ /*0x73*/ "Dummy", // InspectObject (GK2 demo debug function, probably similar to the SCI0-SCI11 InspectObj)
/*0x74*/ "MemoryInfo",
- /*0x75*/ "Profiler",
- /*0x76*/ "Record",
- /*0x77*/ "PlayBack",
- /*0x78*/ "MonoOut",
- /*0x79*/ "SetFatalStr",
+ /*0x75*/ "Dummy", // Profiler (GK2 demo debug function, probably similar to SCI0-SCI11)
+ /*0x76*/ "Dummy", // Record (GK2 demo debug function, probably similar to SCI0-SCI11)
+ /*0x77*/ "Dummy", // PlayBack (GK2 demo debug function, probably similar to SCI0-SCI11)
+ /*0x78*/ "Dummy", // MonoOut (GK2 demo debug function)
+ /*0x79*/ "Dummy", // SetFatalStr (GK2 demo debug function)
/*0x7a*/ "GetCWD",
/*0x7b*/ "ValidPath",
/*0x7c*/ "FileIO",
@@ -776,10 +778,10 @@ static const char *sci2_default_knames[] = {
/*0x82*/ "Array",
/*0x83*/ "String",
/*0x84*/ "RemapColors",
- /*0x85*/ "IntegrityChecking",
- /*0x86*/ "CheckIntegrity",
+ /*0x85*/ "Dummy", // IntegrityChecking (GK2 demo debug function)
+ /*0x86*/ "Dummy", // CheckIntegrity (GK2 demo debug function)
/*0x87*/ "ObjectIntersect",
- /*0x88*/ "MarkMemory",
+ /*0x88*/ "Dummy", // MarkMemory (GK2 demo debug function)
/*0x89*/ "TextWidth",
/*0x8a*/ "PointSize",
@@ -935,7 +937,7 @@ static const char *sci21_default_knames[] = {
/*0x7c*/ "SetQuitStr",
/*0x7d*/ "GetConfig",
/*0x7e*/ "Table",
- /*0x7f*/ "WinHelp", // Windows only
+ /*0x7f*/ "Dummy", // WinHelp, Windows only
/*0x80*/ "Dummy",
/*0x81*/ "Dummy",
/*0x82*/ "Dummy",
@@ -957,11 +959,11 @@ static const char *sci21_default_knames[] = {
/*0x92*/ "PlayVMD",
/*0x93*/ "SetHotRectangles",
/*0x94*/ "MulDiv",
- /*0x95*/ "GetSierraProfileInt", // Windows only
- /*0x96*/ "GetSierraProfileString", // Windows only
+ /*0x95*/ "Dummy", // GetSierraProfileInt, Windows only
+ /*0x96*/ "Dummy", // GetSierraProfileString, Windows only
/*0x97*/ "SetWindowsOption", // Windows only
/*0x98*/ "GetWindowsOption", // Windows only
- /*0x99*/ "WinDLL", // Windows only
+ /*0x99*/ "Dummy", // WinDLL, Windows only
/*0x9a*/ "Dummy",
/*0x9b*/ "Dummy",
/*0x9c*/ "DeletePic"
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index cb6a3d713b..9fa9241627 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1465,6 +1465,18 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) {
+ uint16 windowsOption = argv[0].toUint16();
+ switch (windowsOption) {
+ case 0:
+ // Title bar on/off in Phantasmagoria, we return 0 (off)
+ return NULL_REG;
+ default:
+ warning("GetWindowsOption: Unknown option %d", windowsOption);
+ return NULL_REG;
+ }
+}
+
#endif
} // End of namespace Sci