[Scummvm-cvs-logs] SF.net SVN: scummvm:[55138] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Jan 7 01:12:19 CET 2011
Revision: 55138
http://scummvm.svn.sourceforge.net/scummvm/?rev=55138&view=rev
Author: thebluegr
Date: 2011-01-07 00:12:18 +0000 (Fri, 07 Jan 2011)
Log Message:
-----------
SCI2.1: Kernel function changes (after looking through all of the SCI2.1 games)
- Replaced the stub kWinDLL (unused), as well as the not fully implemented kPrintDebug
functions with empty function calls
- Marked several unused or debug kernel functions as stub
- Added some games where the rest of the unimplemented SCI2.1 kernel functions are used
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/kernel_tables.h
scummvm/trunk/engines/sci/engine/kmisc.cpp
scummvm/trunk/engines/sci/engine/kstring.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2011-01-07 00:07:33 UTC (rev 55137)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2011-01-07 00:12:18 UTC (rev 55138)
@@ -468,8 +468,6 @@
reg_t kMoveToEnd(EngineState *s, int argc, reg_t *argv);
reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv);
reg_t kWinHelp(EngineState *s, int argc, reg_t *argv);
-reg_t kWinDLL(EngineState *s, int argc, reg_t *argv);
-reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv);
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv);
#endif
Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h 2011-01-07 00:07:33 UTC (rev 55137)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h 2011-01-07 00:12:18 UTC (rev 55138)
@@ -510,7 +510,7 @@
// memory") are available. We have our own memory manager and garbage collector, thus we ignore this call.
{ MAP_EMPTY(Purge), SIG_EVERYWHERE, "i", NULL, NULL },
- // Unused SCI2 unused functions, always mapped to kDummy
+ // Unused / debug SCI2 unused functions, always mapped to kDummy
{ MAP_DUMMY(InspectObject), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// Profiler (same as SCI0-SCI1.1)
// Record (same as SCI0-SCI1.1)
@@ -541,50 +541,55 @@
{ MAP_CALL(AddPicAt), SIG_EVERYWHERE, "oiii", NULL, NULL },
{ MAP_CALL(GetWindowsOption), SIG_EVERYWHERE, "i", NULL, NULL },
{ MAP_CALL(WinHelp), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_CALL(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL },
-// Commented out because it needs to be implemented in full generality in Shivers/Full.
-// Since it is not essential to game play, removing it also works.
-//
-// { MAP_CALL(PrintDebug), SIG_EVERYWHERE, "ri", NULL, NULL },
- // SCI2.1 unmapped functions - TODO!
- // SetLanguage
- // FindSelector
- // FindClass
- // CelRect
- // BaseLineSpan
- // CelInfo
- // Bitmap
- // CelLink
- // MovePlaneItems
- // Font
- // ScrollWindow
- // AddLine
- // DeleteLine
- // UpdateLine
- // AddPolygon
- // DeletePolygon
- // UpdatePolygon
- // GetConfig
- // Table
- // LoadChunk
- // SetPalStyleRange
- // NewRoom
- // Priority
- // MorphOn
- // SetHotRectangles
- // DeletePic
+ // SCI2.1 Empty Functions
- // SCI2.1 empty functions
+ // Debug function, used in of Shivers (demo and full). It's marked as a
+ // stub in the original interpreters, but it gets called by the game scripts.
+ // Usually, it gets called with a string (which is the output format) and a
+ // variable number of parameters
+ { MAP_EMPTY(PrintDebug), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// SetWindowsOption is used to set Windows specific options, like for example the title bar visibility of
// the game window in Phantasmagoria 2. We ignore these settings completely.
{ MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL },
- // Unused SCI2.1 unused functions, always mapped to kDummy
- { MAP_DUMMY(GetSierraProfileInt), SIG_EVERYWHERE, "(.*)", NULL, NULL },
- { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ // Unused / debug SCI2.1 unused functions, always mapped to kDummy
+ // The debug functions are called from the inbuilt debugger or polygon
+ // editor in SCI2.1 games. Related objects are: PEditor, EditablePolygon,
+ // aeDisplayClass and scalerCode
+ { MAP_DUMMY(FindSelector), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(FindClass), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(CelRect), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(BaseLineSpan), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(CelLink), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(UpdateLine), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(AddPolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(DeletePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(UpdatePolygon), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(Table), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(LoadChunk), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(Priority), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(DeletePic), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(GetSierraProfileInt), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+
+ // SCI2.1 unmapped functions - TODO!
+ // SetLanguage - used by MUMG Deluxe from the main menu to switch languages
+ // CelInfo - used by Shivers 1
+ // Bitmap
+ // MovePlaneItems - used by SQ6
+ // Font
+ // ScrollWindow - used by Phantasmagoria 1 and SQ6
+ // AddLine - used by Torin's Passage to highlight the chapter buttons
+ // DeleteLine - used by Torin's Passage to delete the highlight from the chapter buttons
+ // GetConfig - used by Phantasmagoria 1
+ // SetPalStyleRange
+ // NewRoom
+ // MorphOn - used by SQ6
+ // SetHotRectangles - used by Phantasmagoria 1
#endif
{ NULL, NULL, SIG_EVERYWHERE, NULL, NULL, NULL }
@@ -1037,7 +1042,7 @@
/*0x80*/ "Dummy",
/*0x81*/ "Dummy",
/*0x82*/ "Dummy",
- /*0x83*/ "PrintDebug", // used by Shivers 2 (demo and full)
+ /*0x83*/ "PrintDebug", // debug function, used by Shivers 2 (demo and full)
/*0x84*/ "Dummy",
/*0x85*/ "Dummy",
/*0x86*/ "Dummy",
Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp 2011-01-07 00:07:33 UTC (rev 55137)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp 2011-01-07 00:12:18 UTC (rev 55138)
@@ -420,18 +420,6 @@
return NULL_REG;
}
-#ifdef ENABLE_SCI32
-reg_t kWinDLL(EngineState *s, int argc, reg_t *argv) {
- kStub(s, argc, argv);
-
- // TODO: This seems to be loading and calling Windows DLLs. We'll probably
- // need to either ignore calls made here, or wire each call for each game
- // that requests it by hand
-
- error("kWinDLL called");
-}
-#endif
-
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
Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp 2011-01-07 00:07:33 UTC (rev 55137)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2011-01-07 00:12:18 UTC (rev 55138)
@@ -804,20 +804,6 @@
return NULL_REG;
}
-/**
- * Debug function, used in the demo of Shivers. It's marked as a stub
- * in the original interpreter, but it gets called by the game scripts.
- */
-reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv) {
- Common::String debugTemplate = s->_segMan->getString(argv[0]);
- char debugString[500];
-
- sprintf(debugString, debugTemplate.c_str(), argv[1].toUint16());
- debugC(kDebugLevelScripts, "kPrintDebug: \"%s\"\n", debugString);
-
- return s->r_acc;
-}
-
#endif
} // End of namespace Sci
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list