diff options
author | sylvaintv | 2012-05-02 00:50:40 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 2861a3f5ec0e57efc1190d82a2a5eed526897e56 (patch) | |
tree | 2a09aa49950d297f89b979d72bf2ff5a07fd5475 /engines/lilliput | |
parent | 3f10768dc1d78f8c8b95b73e52ae3a78eb1d392b (diff) | |
download | scummvm-rg350-2861a3f5ec0e57efc1190d82a2a5eed526897e56.tar.gz scummvm-rg350-2861a3f5ec0e57efc1190d82a2a5eed526897e56.tar.bz2 scummvm-rg350-2861a3f5ec0e57efc1190d82a2a5eed526897e56.zip |
LILLIPUT: Fix some bugs of sub16626
Unsigned/signed
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 10 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 2 | ||||
-rw-r--r-- | engines/lilliput/script.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 9fa1f15730..6937a35075 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1428,7 +1428,7 @@ void LilliputEngine::sub16626() { break; var2 = (2 * (var2 & 0xFF)) + (index << 5); - int var1 = _scriptHandler->_array12311[var2 / 2]; + uint16 var1 = _scriptHandler->_array12311[var2 / 2]; int tmpVal = var2; var2 = ((var1 >> 8) >> 3); var2 &= 0xFE; @@ -1466,7 +1466,9 @@ void LilliputEngine::sub16626() { warning("result = sub_166F7"); break; case 15: - warning("result = sub_166EA"); + _scriptHandler->_array12811[index] = 0x10; + _scriptHandler->_characterScriptEnabled[index] = 1; + result = 1; break; default: warning("sub16626 - unexpected value %d", var2 / 2); @@ -2386,6 +2388,10 @@ while(1);*/ _scriptHandler->runScript(ScriptStream(&_arrayGameScripts[_arrayGameScriptIndex[tmpVal]], _arrayGameScriptIndex[tmpVal + 1] - _arrayGameScriptIndex[tmpVal])); debugC(1, kDebugEngine, "============= End Game Script %d for character %d ==================", tmpVal, index); + + //warning("dump char stat"); + i = index; + warning("char %d, pos %d %d, state %d, script enabled %d", i, _characterPositionX[i], _characterPositionY[i], _characterVariables[i*32+0], _scriptHandler->_characterScriptEnabled[i]); } Common::Error LilliputEngine::run() { diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 42eff0864d..21238aafe3 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -2835,7 +2835,7 @@ void LilliputScript::OC_sub18213() { maxItem = _array1813B[i] >> 8; } } - sub1823E(_vm->_currentScriptCharacter, maxItem, &_vm->_characterVariables[var1]); + sub1823E(_vm->_currentScriptCharacter, maxItem, _vm->_currentCharacterVariables); } void LilliputScript::OC_sub18252() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index c5b67f81f3..3df23d7d8e 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -79,7 +79,7 @@ public: int _heroismBarBottomY; int _word1855E; - short _array12311[640]; + uint16 _array12311[640]; byte _array128EF[40]; byte _array12839[40]; int _array1813B[32]; |