diff options
-rw-r--r-- | engines/lilliput/lilliput.cpp | 8 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 11 | ||||
-rw-r--r-- | engines/lilliput/script.h | 12 |
3 files changed, 16 insertions, 15 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index a97f77c9fc..fb05e1c356 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1246,12 +1246,12 @@ void LilliputEngine::scrollToViewportCharacterTarget() { } void LilliputEngine::viewportScrollTo(Common::Point goalPos) { - debugC(2, kDebugEngineTBC, "viewportScrollTo(%d, %d)", goalPos.x, goalPos.y); + debugC(2, kDebugEngine, "viewportScrollTo(%d, %d)", goalPos.x, goalPos.y); if (goalPos == _scriptHandler->_viewportPos) return; - int dx = 0; + int16 dx = 0; if (goalPos.x != _scriptHandler->_viewportPos.x) { if (goalPos.x < _scriptHandler->_viewportPos.x) --dx; @@ -1259,7 +1259,7 @@ void LilliputEngine::viewportScrollTo(Common::Point goalPos) { ++dx; } - int dy = 0; + int16 dy = 0; if (goalPos.y != _scriptHandler->_viewportPos.y) { if (goalPos.y < _scriptHandler->_viewportPos.y) --dy; @@ -1280,7 +1280,7 @@ void LilliputEngine::viewportScrollTo(Common::Point goalPos) { if (goalPos.y == _scriptHandler->_viewportPos.y) dy = 0; - } while ((dx != 0) && (dy != 0)); + } while ((dx != 0) || (dy != 0)); _soundHandler->contentFct5(); } diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index a7c074038f..0b7303349f 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1376,16 +1376,17 @@ byte LilliputScript::OC_checkCharacterGoalPos() { } byte LilliputScript::OC_comparePos() { - debugC(2, kDebugScriptTBC, "OC_comparePos()"); + debugC(2, kDebugScript, "OC_comparePos()"); int index = getValue1(); - byte d1 = _array16123PosX[index]; - byte d2 = _array1614BPosY[index]; + int8 d1 = _array16123PosX[index]; + int8 d2 = _array1614BPosY[index]; Common::Point var1 = getPosFromScript(); if (var1 == Common::Point(d1, d2)) return 1; + warning("OC_comparePos - debug: %d-%d %d-%d", var1.x, var1.y, d1, d2); return 0; } @@ -2459,7 +2460,7 @@ void LilliputScript::OC_setCurrentCharacter() { _vm->setCurrentCharacter(var1); } -void LilliputScript::sub171AF(int16 var1, int16 var2, int16 var4) { +void LilliputScript::sub171AF(int16 var1, uint16 var2, int16 var4) { debugC(2, kDebugScript, "sub171AF()"); int index = 0; @@ -2475,7 +2476,7 @@ void LilliputScript::sub171AF(int16 var1, int16 var2, int16 var4) { } void LilliputScript::OC_sub17C8B() { - debugC(1, kDebugScriptTBC, "OC_sub17C8B()"); + debugC(1, kDebugScript, "OC_sub17C8B()"); int16 type = 2 << 8; int16 var4 = _currScript->readSint16LE(); diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 68a49485d1..722ae60f99 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -61,14 +61,14 @@ public: byte _characterScriptEnabled[40]; int8 _interfaceHotspotStatus[20]; - char _array16123PosX[40]; - char _array1614BPosY[40]; - char _array12811[40]; - char _array10AB1[40]; + int8 _array16123PosX[40]; + int8 _array1614BPosY[40]; + int8 _array12811[40]; + int8 _array10AB1[40]; byte _array122FD[20]; byte _array122C1[40]; byte _array10A39[40]; - short _array10B51[40 * 40]; + int16 _array10B51[40 * 40]; byte *_savedBuffer215Ptr; @@ -127,7 +127,7 @@ private: void displayNumber(byte var1, Common::Point pos); byte *getMapPtr(Common::Point val); byte *getCurrentCharacterVarFromScript(); - void sub171AF(int16 var1, int16 var2, int16 var4); + void sub171AF(int16 var1, uint16 var2, int16 var4); void sub18B7C(int var1, int var3); void sub189B8(); void formatSpeechString(); |