diff options
author | Filippos Karapetis | 2010-06-25 14:50:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-25 14:50:10 +0000 |
commit | df37aff35756e03e02b47ce3483b06679a662ce6 (patch) | |
tree | 3531aa883c5ba10ed9f1c2c739c3bd00d1f05c5c /engines | |
parent | 494a7fa8abc41915b70f37047149e23fa1980e25 (diff) | |
download | scummvm-rg350-df37aff35756e03e02b47ce3483b06679a662ce6.tar.gz scummvm-rg350-df37aff35756e03e02b47ce3483b06679a662ce6.tar.bz2 scummvm-rg350-df37aff35756e03e02b47ce3483b06679a662ce6.zip |
Added the SCI2.1 kText kernel function (subop 0, kTextSize for now)
svn-id: r50265
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 13 |
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 |