diff options
author | Lars Skovlund | 2010-11-19 12:52:17 +0000 |
---|---|---|
committer | Lars Skovlund | 2010-11-19 12:52:17 +0000 |
commit | 5ecac66c6a489fb0bad44ffbdb9d6d2d225a4aa5 (patch) | |
tree | f846050116a5c2fd4678d32cb453e7b2f2535f01 /engines/sci/engine | |
parent | 84d4a4a89faa5790b4820eb1e9522e83826fb442 (diff) | |
download | scummvm-rg350-5ecac66c6a489fb0bad44ffbdb9d6d2d225a4aa5.tar.gz scummvm-rg350-5ecac66c6a489fb0bad44ffbdb9d6d2d225a4aa5.tar.bz2 scummvm-rg350-5ecac66c6a489fb0bad44ffbdb9d6d2d225a4aa5.zip |
Some subfunctions changed positions in SCI3 kString. WIP.
And with this, LSL7 starts up. Yeah, baby!
svn-id: r54374
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 276f121edf..a8924bd2b1 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -616,6 +616,15 @@ reg_t kText(EngineState *s, int argc, reg_t *argv) { } reg_t kString(EngineState *s, int argc, reg_t *argv) { + + // TODO: Find out how exactly subfunctions work in SCI3 + if (getSciVersion() == SCI_VERSION_3 && + argv[0].toUint16() == 8) + argv[0].offset = 10; + if (getSciVersion() == SCI_VERSION_3 && + argv[0].toUint16() == 11) + argv[0].offset = 13; + switch (argv[0].toUint16()) { case 0: { // New reg_t stringHandle; @@ -780,9 +789,13 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { Common::String string = s->_segMan->getString(argv[1]); return make_reg(0, (uint16)atoi(string.c_str())); } - case 14: // Unknown (SCI3) - warning("Unknown kString subop %d", argv[0].toUint16()); + case 14: { // lower (SCI3) + Common::String string = s->_segMan->getString(argv[1]); + + string.toLowercase(); + s->_segMan->strcpy(argv[1], string.c_str()); return NULL_REG; + } default: error("Unknown kString subop %d", argv[0].toUint16()); } |