diff options
Diffstat (limited to 'engines/lilliput/lilliput.cpp')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 6937a35075..cfb3d1e6c0 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1234,7 +1234,7 @@ void LilliputEngine::renderCharacters(byte *buf, byte x, byte y) { if ((_nextDisplayCharacterX != x) || (_nextDisplayCharacterY != y)) return; - byte _byte16552 = 0; + _byte16552 = 0; if (buf[1] != 0xFF) { int tmpIndex = buf[1]; @@ -1463,7 +1463,7 @@ void LilliputEngine::sub16626() { warning("result = sub_16722"); break; case 14: - warning("result = sub_166F7"); + result = sub166F7(index, var1, tmpVal); break; case 15: _scriptHandler->_array12811[index] = 0x10; @@ -1485,8 +1485,28 @@ void LilliputEngine::sub16626() { } } -int LilliputEngine::sub166DD(int index, int var1) { +byte LilliputEngine::sub166F7(int index, int var1, int tmpVal) { + debugC(2, kDebugEngine, "sub166F7(%d, %d, %d)", index, var1, tmpVal); + + byte a1 = (var1 >> 8); + byte a2 = (var1 & 0xFF); + if (a2 != 0) { + if ((a2 & 0xF0) == 0) + a2 |= (a2 << 4); + + a2 -= 16; + _scriptHandler->_array12311[tmpVal] = (a1 << 8) + a2; + + if ((a2 & 0xF0) == 0) + return 2; + } + + _scriptHandler->_array12811[index] -= ((var1 >> 8) & 0x0F); + return 3; +} +int LilliputEngine::sub166DD(int index, int var1) { + _characterDirectionArray[index] = (var1 >> 8) & 3; sub16685(index, var1 & 0xFF); return 0; @@ -2391,7 +2411,7 @@ while(1);*/ //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]); + debugC(3, kDebugEngine, "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() { |