diff options
author | Johannes Schickel | 2010-07-22 23:16:33 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-07-22 23:16:33 +0000 |
commit | 4b2fca203e19b831b76a7d0ec0ee3c5235ed89ee (patch) | |
tree | e5fd7d0c15979a96045bdbe66d197d04100b075a /engines/kyra | |
parent | 1f60595cdcbc99c9e0ca55d7907bb853690df510 (diff) | |
download | scummvm-rg350-4b2fca203e19b831b76a7d0ec0ee3c5235ed89ee.tar.gz scummvm-rg350-4b2fca203e19b831b76a7d0ec0ee3c5235ed89ee.tar.bz2 scummvm-rg350-4b2fca203e19b831b76a7d0ec0ee3c5235ed89ee.zip |
KYRA: Implement missing dialog code.
This finally enables animations for all of Darm's talk sequences.
svn-id: r51179
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_lok.cpp | 1 | ||||
-rw-r--r-- | engines/kyra/kyra_lok.h | 2 | ||||
-rw-r--r-- | engines/kyra/text_lok.cpp | 22 |
3 files changed, 21 insertions, 4 deletions
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index cf61b58326..159230e928 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -234,6 +234,7 @@ Common::Error KyraEngine_LoK::init() { _talkingCharNum = -1; _charSayUnk3 = -1; + _disabledTalkAnimObject = _enabledTalkAnimObject = 0; memset(_currSentenceColor, 0, 3); _startSentencePalIndex = -1; _fadeText = false; diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 239ca26a11..9f1eb282f5 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -473,6 +473,8 @@ protected: int8 _charSayUnk2; int8 _charSayUnk3; int8 _currHeadShape; + int8 _disabledTalkAnimObject; + int8 _enabledTalkAnimObject; uint8 _currSentenceColor[3]; int8 _startSentencePalIndex; bool _fadeText; diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index 3e45c0f286..79b16bc1be 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -137,8 +137,11 @@ void KyraEngine_LoK::endCharacterChat(int8 charNum, int16 convoInitialized) { _charSayUnk3 = -1; if (charNum > 4 && charNum < 11) { - //TODO: weird _game_inventory stuff here - //warning("STUB: endCharacterChat() for high charnums"); + _animator->sprites()[_disabledTalkAnimObject].active = 1; + _sprites->_anims[_disabledTalkAnimObject].play = true; + + _animator->sprites()[_enabledTalkAnimObject].active = 0; + _sprites->_anims[_enabledTalkAnimObject].play = false; } if (convoInitialized != 0) { @@ -225,8 +228,19 @@ int KyraEngine_LoK::initCharacterChat(int8 charNum) { _animator->restoreAllObjectBackgrounds(); if (charNum > 4 && charNum < 11) { - // TODO: Fill in weird _game_inventory stuff here - //warning("STUB: initCharacterChat() for high charnums"); + const uint8 animDisableTable[] = { 3, 1, 1, 5, 0, 6 }; + const uint8 animEnableTable[] = { 4, 2, 5, 6, 1, 7 }; + + _disabledTalkAnimObject = animDisableTable[charNum - 5]; + _enabledTalkAnimObject = animEnableTable[charNum - 5]; + + _animator->sprites()[_disabledTalkAnimObject].active = 0; + _sprites->_anims[_disabledTalkAnimObject].play = false; + + _animator->sprites()[_enabledTalkAnimObject].active = 1; + _sprites->_anims[_enabledTalkAnimObject].play = true; + + _charSayUnk2 = _enabledTalkAnimObject; } _animator->flagAllObjectsForRefresh(); |