[Scummvm-cvs-logs] SF.net SVN: scummvm:[52665] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Sep 9 22:09:33 CEST 2010
Revision: 52665
http://scummvm.svn.sourceforge.net/scummvm/?rev=52665&view=rev
Author: thebluegr
Date: 2010-09-09 20:09:32 +0000 (Thu, 09 Sep 2010)
Log Message:
-----------
SCI: Implemented the kPrintDebug SCI2.1 kernel function, used in Shivers (demo)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/kernel_tables.h
scummvm/trunk/engines/sci/engine/kstring.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2010-09-09 20:07:53 UTC (rev 52664)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2010-09-09 20:09:32 UTC (rev 52665)
@@ -461,13 +461,13 @@
reg_t kPlayVMD(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 kAddBefore(EngineState *s, int argc, reg_t *argv);
+reg_t kMoveToFront(EngineState *s, int argc, reg_t *argv);
+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 kAddBefore(EngineState *s, int argc, reg_t *argv);
-reg_t kMoveToFront(EngineState *s, int argc, reg_t *argv);
-reg_t kMoveToEnd(EngineState *s, int argc, reg_t *argv);
+reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv);
#endif
reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);
Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h 2010-09-09 20:07:53 UTC (rev 52664)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h 2010-09-09 20:09:32 UTC (rev 52665)
@@ -503,7 +503,8 @@
{ 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(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_CALL(PrintDebug), SIG_EVERYWHERE, "ri", NULL, NULL },
// SCI2.1 empty functions
{ MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL },
Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp 2010-09-09 20:07:53 UTC (rev 52664)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2010-09-09 20:09:32 UTC (rev 52665)
@@ -787,6 +787,20 @@
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(2, "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