diff options
author | sylvaintv | 2012-04-22 01:33:12 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | c6ee25b179bc88d9570e1537009fe25d7beea773 (patch) | |
tree | 1e9664702757f5c7f32915bc6178a89d13b54d7f /engines | |
parent | 16ec550df57d3bb1bc661ec46872b31ca5239adb (diff) | |
download | scummvm-rg350-c6ee25b179bc88d9570e1537009fe25d7beea773.tar.gz scummvm-rg350-c6ee25b179bc88d9570e1537009fe25d7beea773.tar.bz2 scummvm-rg350-c6ee25b179bc88d9570e1537009fe25d7beea773.zip |
LILLIPUT: Minor fixes
Prevents unexpected values in sub16626
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 6 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 6 | ||||
-rw-r--r-- | engines/lilliput/script.h | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index caf83019f0..016b0f63fb 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1010,12 +1010,12 @@ void LilliputEngine::sub16626() { while (index >= 0) { result = 0; while (result != 2) { - int var2 = _scriptHandler->_array12811[index]; + int var2 = _scriptHandler->_array12811[index] & 0xFF; if (var2 == 16) break; - var2 = (var2 * 2) + (index << 5); + var2 = var2 + (index << 4); int var1 = _scriptHandler->_array12311[var2]; - var2 = ((var2 & 0xFF00) + (var1 >> 8)) >> 3; + var2 = (var1 >> 8) >> 3; var2 &= 0xFE; // temporary hack diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index d99b8e7932..cc143f1fdd 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1339,11 +1339,13 @@ void LilliputScript::OC_sub17D57() { debugC(1, kDebugScript, "OC_sub17D57()"); int curWord = _currScript->readUint16LE(); - curWord = sub17D40(curWord); - _word1881B = _vm->_rulesBuffer2PrevIndx; + if((_byte16F08 == 1) || (_array16173[_vm->_rulesBuffer2PrevIndx] == 0xFF)) + return; + _word1881B = _vm->_rulesBuffer2PrevIndx; sub18B3C(curWord); + } void LilliputScript::OC_sub17D7F() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 07d2139663..668040d499 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -48,7 +48,7 @@ public: int _word10802; int _word1881B; - int _array12311[640]; + short _array12311[640]; LilliputScript(LilliputEngine *vm); ~LilliputScript(); |