From 3b79d6b28b4854507d9223d8f4e77bd65c19d12b Mon Sep 17 00:00:00 2001 From: athrxx Date: Mon, 9 Aug 2021 00:30:00 +0200 Subject: [PATCH] KYRA: (HOF) - fix bug no. 6285 ("Faun disappears/reappears at the end of the intro") --- engines/kyra/sequence/sequences_hof.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/engines/kyra/sequence/sequences_hof.cpp b/engines/kyra/sequence/sequences_hof.cpp index aa5aa91a519..ebbd91b17a4 100644 --- a/engines/kyra/sequence/sequences_hof.cpp +++ b/engines/kyra/sequence/sequences_hof.cpp @@ -986,15 +986,11 @@ void SeqPlayer_HOF::playAnimation(WSAMovie_v2 *wsaObj, int startFrame, int lastF if (wsaObj || callback) _screen->copyPage(12, 2); - int frameIndex = _animCurrentFrame; - if (wsaObj) - frameIndex %= wsaObj->frames(); - if (callback) - (this->*callback)(wsaObj, x, y, frameIndex); + (this->*callback)(wsaObj, x, y, wsaObj ? _animCurrentFrame % wsaObj->frames() : _animCurrentFrame); if (wsaObj) - wsaObj->displayFrame(frameIndex, 2, x, y, 0, 0, 0); + wsaObj->displayFrame(_animCurrentFrame % wsaObj->frames(), 2, x, y, 0, 0, 0); _screen->copyPage(2, 12); @@ -1095,7 +1091,7 @@ void SeqPlayer_HOF::playDialogueAnimation(uint16 strID, uint16 soundID, int text if (ABS(animLastFrame) < curframe) curframe = ABS(animLastFrame); - if (curframe == animStartFrame) + if (curframe == animStartFrame && animStartFrame < animLastFrame) curframe++; _animCurrentFrame = curframe; @@ -1297,7 +1293,7 @@ void SeqPlayer_HOF::playSoundEffect(uint16 id, int16 vol) { void SeqPlayer_HOF::playSoundAndDisplaySubTitle(uint16 id) { assert(id < _sequenceSoundListSize); - if (id < 12 && !_vm->gameFlags().isDemo && _vm->textEnabled()) + if (id < 12 && !(_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) && _vm->textEnabled()) displaySubTitle(id, 160, 168, _textDuration[id], 160); _vm->sound()->voicePlay(_sequenceSoundList[id], 0);