diff options
author | Matthew Hoops | 2013-04-23 22:32:01 -0400 |
---|---|---|
committer | Matthew Hoops | 2013-04-23 22:34:37 -0400 |
commit | 829847cb8824f073ac34377bc3759134941611d5 (patch) | |
tree | a3f804070da6ce7ec0173928ad9ad1de0cfadaea /engines/sci/engine | |
parent | 03882de79b4fb9ebb995507f136e79db425d8377 (diff) | |
download | scummvm-rg350-829847cb8824f073ac34377bc3759134941611d5.tar.gz scummvm-rg350-829847cb8824f073ac34377bc3759134941611d5.tar.bz2 scummvm-rg350-829847cb8824f073ac34377bc3759134941611d5.zip |
SCI: Fix kMessage REF subop ordering
Thanks to waltervn for testing values from running in DOSBox.
Fixes bug #3034704
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 65e139e1ee..15a9f54996 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -488,9 +488,9 @@ enum kMessageFunc { K_MESSAGE_GET, K_MESSAGE_NEXT, K_MESSAGE_SIZE, - K_MESSAGE_REFCOND, - K_MESSAGE_REFVERB, K_MESSAGE_REFNOUN, + K_MESSAGE_REFVERB, + K_MESSAGE_REFCOND, K_MESSAGE_PUSH, K_MESSAGE_POP, K_MESSAGE_LASTMESSAGE @@ -511,16 +511,10 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) { #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { // In complete weirdness, SCI32 bumps up subops 3-8 to 4-9 and stubs off subop 3. - // In addition, SCI32 reorders the REF* subops. if (func == 3) error("SCI32 kMessage(3)"); - else if (func > 3) { + else if (func > 3) func--; - if (func == K_MESSAGE_REFCOND) - func = K_MESSAGE_REFNOUN; - else if (func == K_MESSAGE_REFNOUN || func == K_MESSAGE_REFVERB) - func--; - } } #endif |