diff options
author | Johannes Schickel | 2007-01-31 17:48:26 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-01-31 17:48:26 +0000 |
commit | 9799b346d86c5151d66d93f034cf5d1a40dbb15b (patch) | |
tree | 6d95406110dd4d557c05e9d67f9c6041c782f836 /engines | |
parent | 8b4001f4908c2653338521d297661fc6faa169ea (diff) | |
download | scummvm-rg350-9799b346d86c5151d66d93f034cf5d1a40dbb15b.tar.gz scummvm-rg350-9799b346d86c5151d66d93f034cf5d1a40dbb15b.tar.bz2 scummvm-rg350-9799b346d86c5151d66d93f034cf5d1a40dbb15b.zip |
Fix for bug #1479856 ("KYRA1: gfx glitch when dying on bridge").
svn-id: r25312
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/animator.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/text.cpp | 28 |
2 files changed, 19 insertions, 11 deletions
diff --git a/engines/kyra/animator.cpp b/engines/kyra/animator.cpp index 3a632634cd..44220e856f 100644 --- a/engines/kyra/animator.cpp +++ b/engines/kyra/animator.cpp @@ -257,7 +257,7 @@ void ScreenAnimator::prepDrawAllObjects() { } // talking head functionallity - if (_vm->_talkingCharNum != -1) { + if (_vm->_talkingCharNum != -1 && (_vm->_currentCharacter->currentAnimFrame != 88 || curObject->index != 0)) { const int16 baseAnimFrameTable1[] = { 0x11, 0x35, 0x59, 0x00, 0x00, 0x00 }; const int16 baseAnimFrameTable2[] = { 0x15, 0x39, 0x5D, 0x00, 0x00, 0x00 }; const int8 xOffsetTable1[] = { 2, 4, 0, 5, 2, 0, 0, 0 }; 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) { |