aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kernel.cpp7
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel32.cpp13
3 files changed, 17 insertions, 4 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index c9b547e6f8..41a2d2dd2b 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -357,6 +357,8 @@ static SciKernelFunction s_kernelFuncMap[] = {
{ "TextColors", kTextColors, ".*" },
{ "TextFonts", kTextFonts, ".*" },
{ "Portrait", kPortrait, ".*" },
+ { "PalVary", kPalVary, "ii*" },
+ { "AssertPalette", kAssertPalette, "i" },
{ "Empty", kEmpty, ".*" },
#ifdef ENABLE_SCI32
@@ -389,13 +391,10 @@ static SciKernelFunction s_kernelFuncMap[] = {
{ "PlayVMD", kPlayVMD, ".*" },
{ "IsOnMe", kIsOnMe, "iio.*" },
{ "MulDiv", kMulDiv, "iii" },
+ { "Text", kText, ".*" },
#endif
- // its a stub, but its needed for Pharkas to work
- { "PalVary", kPalVary, "ii*" },
- { "AssertPalette", kAssertPalette, "i" },
-
#if 0
// Stub functions
/*09*/ { "Show", kShow, "i" },
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 802a2d5f0b..4333f6ef77 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -439,6 +439,7 @@ reg_t kOnMe(EngineState *s, int argc, reg_t *argv);
reg_t kInPolygon(EngineState *s, int argc, reg_t *argv);
// SCI2.1 Kernel Functions
+reg_t kText(EngineState *s, int argc, reg_t *argv);
reg_t kSave(EngineState *s, int argc, reg_t *argv);
reg_t kList(EngineState *s, int argc, reg_t *argv);
reg_t kRobot(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index b317719252..93191947ba 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -511,6 +511,19 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+reg_t kText(EngineState *s, int argc, reg_t *argv) {
+ switch (argv[0].toUint16()) {
+ case 0:
+ return kTextSize(s, argc - 1, argv + 1);
+ break;
+ default:
+ warning("kText(%d)", argv[0].toUint16());
+ break;
+ }
+
+ return s->r_acc;
+}
+
reg_t kString(EngineState *s, int argc, reg_t *argv) {
switch (argv[0].toUint16()) {
case 0: { // New