From 0ec258f5ffcfe75ad5e83f32c7b1b841280bc654 Mon Sep 17 00:00:00 2001 From: Adrian Frühwirth Date: Sun, 11 Feb 2018 11:58:26 +0100 Subject: TUCKER: Fix original game glitch in Bud animation sequence 8 Fixes Trac#10430. --- engines/tucker/resource.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3