aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-01-22 22:02:51 +0100
committerEugene Sandulenko2018-01-31 19:02:29 +0100
commit3c37c42bd08b8c220b17de75a3f3370e7e3474c4 (patch)
treeba065ea7f2d97cc8ddbd9e3783a1f31574cdc314 /engines
parentff8e4a4410eb28690d7b220a99ee47f1e672d71a (diff)
downloadscummvm-rg350-3c37c42bd08b8c220b17de75a3f3370e7e3474c4.tar.gz
scummvm-rg350-3c37c42bd08b8c220b17de75a3f3370e7e3474c4.tar.bz2
scummvm-rg350-3c37c42bd08b8c220b17de75a3f3370e7e3474c4.zip
TUCKER: Cure Bud's and Billy's seasickness
This ensures that the calculated offsets for Bud and Billy are [0,2] px and follow the sequence 0px -> 1px -> 2px -> 1px -> 0px as opposed to the earlier 0px -> 1px -> 2px -> 3px -> 0px which resulted in them teleporting back to their original location and on top of that being out of sync with the boat. Fixes Trac#6643.
Diffstat (limited to 'engines')
-rw-r--r--engines/tucker/tucker.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 85499b08e5..acb0805fd8 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -496,12 +496,9 @@ void TuckerEngine::mainLoop() {
}
_currentGfxBackground = _quadBackgroundGfxBuf + (_currentGfxBackgroundCounter / 10) * 44800;
if (_fadePaletteCounter < 34 && _locationNum == 22) {
- _spritesTable[0]._gfxBackgroundOffset = (_currentGfxBackgroundCounter / 10) * 640;
- _mainSpritesBaseOffset = _currentGfxBackgroundCounter / 10;
- if (_locationNum == 22 && _currentGfxBackgroundCounter <= 29) {
- _spritesTable[0]._gfxBackgroundOffset = 640;
- _mainSpritesBaseOffset = 1;
- }
+ int offset = (_currentGfxBackgroundCounter > 29 ? 1 : (_currentGfxBackgroundCounter / 10));
+ _spritesTable[0]._gfxBackgroundOffset = offset * 640;
+ _mainSpritesBaseOffset = offset;
}
_fullRedraw = true;
} else {