diff options
-rw-r--r-- | engines/kyra/text_v2.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/kyra/text_v2.cpp b/engines/kyra/text_v2.cpp index 2248353012..0e5470a118 100644 --- a/engines/kyra/text_v2.cpp +++ b/engines/kyra/text_v2.cpp @@ -430,14 +430,8 @@ void KyraEngine_v2::zanthRandomIdleChat() { } void KyraEngine_v2::updateDlgBuffer() { - char filename[13]; - static const char suffixTalkie[] = "EFG"; static const char suffixTowns[] = "G J"; - const char * suffix = _flags.isTalkie ? suffixTalkie : suffixTowns; - - if (_flags.platform != Common::kPlatformPC || _flags.isTalkie) - filename[11] = suffix[_lang]; if (_currentChapter == _npcTalkChpIndex && _mainCharacter.dlgIndex == _npcTalkDlgIndex) return; @@ -445,8 +439,13 @@ void KyraEngine_v2::updateDlgBuffer() { _npcTalkChpIndex = _currentChapter; _npcTalkDlgIndex = _mainCharacter.dlgIndex; + char filename[13]; snprintf(filename, 13, "CH%.02d-S%.02d.DLG", _currentChapter, _npcTalkDlgIndex); + const char *suffix = _flags.isTalkie ? suffixTalkie : suffixTowns; + if (_flags.platform != Common::kPlatformPC || _flags.isTalkie) + filename[11] = suffix[_lang]; + if (_dlgBuffer) delete [] _dlgBuffer; |