From 3557ff5747cbbc8578f2b7ef934b3344d252e4a0 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Thu, 17 Feb 2011 15:42:28 +0100 Subject: TUCKER: fix #3106536 - Punk stuck (moving in background) --- engines/tucker/locations.cpp | 2 +- engines/tucker/tucker.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/tucker') diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp index ed528042cc..d99208edc0 100644 --- a/engines/tucker/locations.cpp +++ b/engines/tucker/locations.cpp @@ -676,7 +676,7 @@ void TuckerEngine::execData3PostUpdate_locationNum8() { void TuckerEngine::updateSprite_locationNum9_0(int i) { if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) { - _spritesTable[0].needUpdate = 1; + _spritesTable[i].needUpdate = 1; _spritesTable[i].state = 3; } else if (_updateLocationCounter2 > 0 || getRandomNumber() > 30000) { _spritesTable[i].state = 1; diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index ad10b5b73a..754ec218c6 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -1921,7 +1921,9 @@ void TuckerEngine::drawSprite(int num) { Graphics::decodeRLE_248(dstPtr, srcPtr, srcW, srcH, 0, s->yMaxBackground, s->flipX != 0); break; } - addDirtyRect(xPos, srcY, srcW, srcH); + const int xR = srcX + (s->gfxBackgroundOffset % 640); + const int yR = srcY + (s->gfxBackgroundOffset / 640); + addDirtyRect(xR, yR, srcW, srcH); } } -- cgit v1.2.3