diff options
author | Strangerke | 2018-04-16 06:54:04 +0200 |
---|---|---|
committer | Strangerke | 2018-04-16 06:54:04 +0200 |
commit | f01af1690e1e8f7169ba8b263e1c9cf71bdfe287 (patch) | |
tree | b1e8180a2d530a7f0708c583d0b38deb4dba7811 /engines/lilliput/lilliput.cpp | |
parent | 0922d44199aa492cd57bc3fe1a40e0ff631e98ba (diff) | |
download | scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.tar.gz scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.tar.bz2 scummvm-rg350-f01af1690e1e8f7169ba8b263e1c9cf71bdfe287.zip |
LILLIPUT: Fix a regresssion in scrollToViewportCharacterTarget(), some more renaming
Diffstat (limited to 'engines/lilliput/lilliput.cpp')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 5aee74f56b..4fca379468 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -253,7 +253,7 @@ void LilliputEngine::update() { } void LilliputEngine::newInt8() { - _soundHandler->contentFct1(); + _soundHandler->refresh(); if (_byte12A05 != 0) --_byte12A05; @@ -1129,19 +1129,29 @@ void LilliputEngine::scrollToViewportCharacterTarget() { Common::Point newPos = _scriptHandler->_viewportPos; if (tileX >= 1) { - if (tileX > 6) - newPos.x = CLIP(newPos.x + 4, 0, 56); - } else - newPos.x = CLIP(newPos.x - 4, 0, 56); + if (tileX > 6){ + newPos.x += 4; + if (newPos.x > 56) + newPos.x = 56; + } + } else { + newPos.x -= 4; + if (newPos.x < 0) + newPos.x = 0; + } if ((tileY < 1) && (newPos.y < 4)) newPos.y = 0; - else if (tileY >= 1) - newPos.y = CLIP(newPos.y + 4, 0, 56); - else - // CHECKME: not clipped? - newPos.y -= 4; + else { + if (tileY < 1) + newPos.y -= 4; + if (tileY > 6) { + newPos.y += 4; + if (newPos.y >= 56) + newPos.y = 56; + } + } viewportScrollTo(newPos); } @@ -1182,7 +1192,7 @@ void LilliputEngine::viewportScrollTo(Common::Point goalPos) { dy = 0; } while ((dx != 0) || (dy != 0)); - _soundHandler->contentFct5(); + _soundHandler->update(); } void LilliputEngine::renderCharacters(byte *buf, Common::Point pos) { @@ -1664,7 +1674,7 @@ byte LilliputEngine::sequenceSound(int index, Common::Point var1) { debugC(2, kDebugEngine, "sequenceSound(%d, %d - %d)", index, var1.x, var1.y); int param4x = ((index | 0xFF00) >> 8); - _soundHandler->contentFct2(var1.y, _scriptHandler->_viewportPos, + _soundHandler->play(var1.y, _scriptHandler->_viewportPos, _scriptHandler->_characterTilePos[index], Common::Point(param4x, 0)); return kSeqRepeat; } |