aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/text
diff options
context:
space:
mode:
authorathrxx2019-04-06 17:59:43 +0200
committerathrxx2019-04-13 18:55:01 +0200
commitd7e6b46814bdad33c5da667540ecc3c610f482ab (patch)
tree827960fb7763067cfee77b7b15b75b4401fbe478 /engines/kyra/text
parent2692702892d746731c8adc870c885f0be21d20f8 (diff)
downloadscummvm-rg350-d7e6b46814bdad33c5da667540ecc3c610f482ab.tar.gz
scummvm-rg350-d7e6b46814bdad33c5da667540ecc3c610f482ab.tar.bz2
scummvm-rg350-d7e6b46814bdad33c5da667540ecc3c610f482ab.zip
KYRA: (EOB2/Amiga) - fix German version text
(add necessary character conversion)
Diffstat (limited to 'engines/kyra/text')
-rw-r--r--engines/kyra/text/text_rpg.cpp22
-rw-r--r--engines/kyra/text/text_rpg.h2
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;