aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kmisc.cpp8
3 files changed, 10 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 6cacb5f839..b3677d965b 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -630,6 +630,7 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv);
reg_t kMessageBox(EngineState *s, int argc, reg_t *argv);
reg_t kGetConfig(EngineState *s, int argc, reg_t *argv);
reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv);
+reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv);
reg_t kCelInfo(EngineState *s, int argc, reg_t *argv);
reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv);
reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index b8d8450bc1..8d2408a3be 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -929,7 +929,7 @@ static SciKernelMapEntry s_kernelMap[] = {
// 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 },
+ { MAP_CALL(PrintDebug), SIG_SCI32, SIGFOR_ALL, "r(.*)", 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.
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index f2a3c6b0f7..9aa03a4760 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -459,6 +459,14 @@ reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) {
}
}
+extern Common::String format(const Common::String &source, int argc, const reg_t *argv);
+
+reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv) {
+ const Common::String debugString = s->_segMan->getString(argv[0]);
+ debugC(kDebugLevelGame, "%s", format(debugString, argc - 1, argv + 1).c_str());
+ return s->r_acc;
+}
+
#endif
// kIconBar is really a subop of kMacPlatform for SCI1.1 Mac