aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-18 22:23:31 +0000
committerJohannes Schickel2008-04-18 22:23:31 +0000
commit0824721746a6ef07749323d9fdfa20fbf4824fca (patch)
tree811139e3b420a9af5e7a78db73b79c41f44fdb5c /engines/kyra
parent2fe0988d27545da9bd5174f9030bcedcea6d016f (diff)
downloadscummvm-rg350-0824721746a6ef07749323d9fdfa20fbf4824fca.tar.gz
scummvm-rg350-0824721746a6ef07749323d9fdfa20fbf4824fca.tar.bz2
scummvm-rg350-0824721746a6ef07749323d9fdfa20fbf4824fca.zip
Cleanup.
svn-id: r31566
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/text_v2.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/engines/kyra/text_v2.cpp b/engines/kyra/text_v2.cpp
index 96a731752b..2248353012 100644
--- a/engines/kyra/text_v2.cpp
+++ b/engines/kyra/text_v2.cpp
@@ -430,19 +430,13 @@ void KyraEngine_v2::zanthRandomIdleChat() {
}
void KyraEngine_v2::updateDlgBuffer() {
- static const char DlgFileTemplate[] = "CH**-S**.DLG";
char filename[13];
- filename[12] = 0;
- memcpy(filename, DlgFileTemplate, 12);
static const char suffixTalkie[] = "EFG";
static const char suffixTowns[] = "G J";
const char * suffix = _flags.isTalkie ? suffixTalkie : suffixTowns;
- filename[2] = (char)((_currentChapter / 10 + 48) & 0xFF);
- filename[3] = (char)((_currentChapter % 10 + 48) & 0xFF);
-
- if (!(_flags.platform == Common::kPlatformPC && !_flags.isTalkie))
+ if (_flags.platform != Common::kPlatformPC || _flags.isTalkie)
filename[11] = suffix[_lang];
if (_currentChapter == _npcTalkChpIndex && _mainCharacter.dlgIndex == _npcTalkDlgIndex)
@@ -451,8 +445,7 @@ void KyraEngine_v2::updateDlgBuffer() {
_npcTalkChpIndex = _currentChapter;
_npcTalkDlgIndex = _mainCharacter.dlgIndex;
- filename[6] = (char)((_npcTalkDlgIndex / 10 + 48) & 0xFF);
- filename[7] = (char)((_npcTalkDlgIndex % 10 + 48) & 0xFF);
+ snprintf(filename, 13, "CH%.02d-S%.02d.DLG", _currentChapter, _npcTalkDlgIndex);
if (_dlgBuffer)
delete [] _dlgBuffer;