From 9799b346d86c5151d66d93f034cf5d1a40dbb15b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 31 Jan 2007 17:48:26 +0000 Subject: Fix for bug #1479856 ("KYRA1: gfx glitch when dying on bridge"). svn-id: r25312 --- engines/kyra/text.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'engines/kyra/text.cpp') diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp index 1de596f2d1..ef9337c47a 100644 --- a/engines/kyra/text.cpp +++ b/engines/kyra/text.cpp @@ -153,7 +153,8 @@ void KyraEngine::endCharacterChat(int8 charNum, int16 convoInitialized) { if (convoInitialized != 0) { _talkingCharNum = -1; - _currentCharacter->currentAnimFrame = 7; + if (_currentCharacter->currentAnimFrame != 88) + _currentCharacter->currentAnimFrame = 7; _animator->animRefreshNPC(0); _animator->updateAllObjectShapes(); } @@ -167,7 +168,9 @@ void KyraEngine::restoreChatPartnerAnimFrame(int8 charNum) { _animator->animRefreshNPC(charNum); } - _currentCharacter->currentAnimFrame = 7; + if (_currentCharacter->currentAnimFrame != 88) + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); _animator->updateAllObjectShapes(); } @@ -178,10 +181,11 @@ void KyraEngine::backupChatPartnerAnimFrame(int8 charNum) { if (charNum < 5 && charNum > 0) _currentChatPartnerBackupFrame = _characterList[charNum].currentAnimFrame; - if (_scaleMode != 0) - _currentCharacter->currentAnimFrame = 7; - else + if (_currentCharacter->currentAnimFrame != 88) { _currentCharacter->currentAnimFrame = 16; + if (_scaleMode != 0) + _currentCharacter->currentAnimFrame = 7; + } _animator->animRefreshNPC(0); _animator->updateAllObjectShapes(); @@ -210,13 +214,17 @@ int8 KyraEngine::getChatPartnerNum() { } int KyraEngine::initCharacterChat(int8 charNum) { + int returnValue = 0; + if (_talkingCharNum == -1) { + returnValue = 1; _talkingCharNum = 0; - - if (_scaleMode != 0) - _currentCharacter->currentAnimFrame = 7; - else + + if (_currentCharacter->currentAnimFrame != 88) { _currentCharacter->currentAnimFrame = 16; + if (_scaleMode != 0) + _currentCharacter->currentAnimFrame = 7; + } _animator->animRefreshNPC(0); _animator->updateAllObjectShapes(); @@ -236,7 +244,7 @@ int KyraEngine::initCharacterChat(int8 charNum) { _animator->preserveAnyChangedBackgrounds(); _charSayUnk3 = charNum; - return 1; + return returnValue; } void KyraEngine::characterSays(const char *chatStr, int8 charNum, int8 chatDuration) { -- cgit v1.2.3