diff options
Diffstat (limited to 'engines/kyra/text/text_rpg.cpp')
-rw-r--r-- | engines/kyra/text/text_rpg.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/kyra/text/text_rpg.cpp b/engines/kyra/text/text_rpg.cpp index f9d2a42472..7b891eea5e 100644 --- a/engines/kyra/text/text_rpg.cpp +++ b/engines/kyra/text/text_rpg.cpp @@ -116,6 +116,7 @@ void TextDisplayer_rpg::removePageBreakFlag() { } void TextDisplayer_rpg::displayText(char *str, ...) { + convertString(str); _printFlag = false; _lineWidth = 0; @@ -754,6 +755,27 @@ void TextDisplayer_rpg::displayWaitButton() { SWAP(_vm->_dialogueButtonLabelColor1, _vm->_dialogueButtonLabelColor2); } +void TextDisplayer_rpg::convertString(char *str) { + static const char convertTable_EOB2_Amiga_DE[] = { + '\x84', '\x7F', '\x8E', '\x7F', '\x81', '\x7D', '\x9A', '\x7D', '\x94', '\x7E', '\x99', '\x7E', '\0', '\0' + }; + + const char *table = 0; + + if (_vm->game() == GI_EOB2 && _vm->gameFlags().platform == Common::kPlatformAmiga && _vm->gameFlags().lang == Common::DE_DEU) + table = convertTable_EOB2_Amiga_DE; + + if (!table) + return; + + for (; *str; ++str) { + for (const char *c = table; *c; c += 2) { + if ((*str) == c[0]) + *str = c[1]; + } + } +} + } // End of namespace Kyra #endif // (ENABLE_EOB || ENABLE_LOL) |