aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-02-11 11:58:26 +0100
committerAdrian Frühwirth2018-02-11 11:58:26 +0100
commit0ec258f5ffcfe75ad5e83f32c7b1b841280bc654 (patch)
tree8e1f96e3a5712840d9b75df4bea988dea12805f0 /engines
parent43053644a8088deacd067616fb9b4f48bcb07878 (diff)
downloadscummvm-rg350-0ec258f5ffcfe75ad5e83f32c7b1b841280bc654.tar.gz
scummvm-rg350-0ec258f5ffcfe75ad5e83f32c7b1b841280bc654.tar.bz2
scummvm-rg350-0ec258f5ffcfe75ad5e83f32c7b1b841280bc654.zip
TUCKER: Fix original game glitch in Bud animation sequence 8
Fixes Trac#10430.
Diffstat (limited to 'engines')
-rw-r--r--engines/tucker/resource.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index 2fe26fae28..82be9abafc 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -430,10 +430,20 @@ int TuckerEngine::loadCTable01(int *framesCount) {
continue;
}
const int y = t.getNextInteger();
- SpriteFrame *c = &_spriteFramesTable[lastSpriteNum++];
+ SpriteFrame *c = &_spriteFramesTable[lastSpriteNum];
c->_sourceOffset = y * 320 + x;
c->_xSize = t.getNextInteger();
c->_ySize = t.getNextInteger();
+
+ // WORKAROUND: original game glitch
+ // The sprite grab animation table incorrectly states a height of 24
+ // pixels for sprite number 57 while the correct size is 54 pixels.
+ // This fixes a glitch in animation sequence 8 (the only to use sprite 57)
+ // which gets triggered when picking up the nail in front of the museum.
+ // Fixes Trac#10430
+ if (lastSpriteNum == 57)
+ c->_ySize = 54;
+
c->_xOffset = t.getNextInteger();
if (c->_xOffset > 300) {
c->_xOffset -= 500;
@@ -442,6 +452,7 @@ int TuckerEngine::loadCTable01(int *framesCount) {
if (c->_yOffset > 300) {
c->_yOffset -= 500;
}
+ ++lastSpriteNum;
}
}
framesCount[count] = -1;