diff options
Diffstat (limited to 'engines/kyra/text')
-rw-r--r-- | engines/kyra/text/text_rpg.cpp | 22 | ||||
-rw-r--r-- | engines/kyra/text/text_rpg.h | 2 |
2 files changed, 24 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) diff --git a/engines/kyra/text/text_rpg.h b/engines/kyra/text/text_rpg.h index 7f5825f4bc..36d5d1f24c 100644 --- a/engines/kyra/text/text_rpg.h +++ b/engines/kyra/text/text_rpg.h @@ -67,6 +67,8 @@ protected: virtual void textPageBreak(); void displayWaitButton(); + void convertString(char *str); + char *_dialogueBuffer; char *_tempString1; |