From ef1b0171bf206c86c05cb75fafa9bc60f6c6a251 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 26 Apr 2018 07:09:57 +0200 Subject: LILLIPUT: Fix regression introduced in 56db8c626eb095fc21a4648e7cc79f7ed0bd1260 --- engines/lilliput/lilliput.cpp | 6 +++--- engines/lilliput/script.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 88bea2ab71..eb93516bed 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1423,9 +1423,9 @@ void LilliputEngine::homeInPathFinding(int index) { } if (_enclosureRect[enclosureSrc].bottom != _enclosureRect[enclosureSrc].top) { - if (_portalPos[enclosureSrc].y == _enclosureRect[enclosureSrc].bottom) + if (_portalPos[enclosureSrc].y == _enclosureRect[enclosureSrc].top) _characterSubTargetPos[index] = Common::Point(_portalPos[enclosureSrc].x, _portalPos[enclosureSrc].y - 1); - else // CHECKME: Should be a check on y == top + else // CHECKME: Should be a check on y == bottom _characterSubTargetPos[index] = Common::Point(_portalPos[enclosureSrc].x, _portalPos[enclosureSrc].y + 1); return; @@ -2573,8 +2573,8 @@ void LilliputEngine::loadRules() { for (int i = 0; i < _rectNumb; i++) { _enclosureRect[i].right = (int16)f.readByte(); _enclosureRect[i].left = (int16)f.readByte(); - _enclosureRect[i].top = (int16)f.readByte(); _enclosureRect[i].bottom = (int16)f.readByte(); + _enclosureRect[i].top = (int16)f.readByte(); int16 tmpValY = (int16)f.readByte(); int16 tmpValX = (int16)f.readByte(); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 10c41ee002..cc78c31d37 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1534,10 +1534,10 @@ byte LilliputScript::OC_compareCoords_1() { byte LilliputScript::OC_compareCoords_2() { debugC(1, kDebugScript, "OC_compareCoords_2()"); - int16 index = getValue1(); - index = _currScript->readUint16LE(); + int16 idx1 = getValue1(); + int16 idx2 = _currScript->readUint16LE(); - if (_vm->_enclosureRect[index].contains(_characterTilePos[index])) + if (_vm->_enclosureRect[idx2].contains(_characterTilePos[idx1])) return 1; return 0; } -- cgit v1.2.3