aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
authorlukaslw2014-06-14 16:29:49 +0200
committerlukaslw2014-06-22 20:09:01 +0200
commit9e94888fa288ef9a4388eb13c118d0b7ac0ada2c (patch)
tree18adaffcd18e6e0e18f4ff8db43f0f876bee8199 /engines/prince
parentdb19f9282cce98f8adf2aba07f12e3caf51f793c (diff)
downloadscummvm-rg350-9e94888fa288ef9a4388eb13c118d0b7ac0ada2c.tar.gz
scummvm-rg350-9e94888fa288ef9a4388eb13c118d0b7ac0ada2c.tar.bz2
scummvm-rg350-9e94888fa288ef9a4388eb13c118d0b7ac0ada2c.zip
PRINCE: German special letters fix in intro - printAt function
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/option_text.h2
-rw-r--r--engines/prince/prince.cpp35
2 files changed, 35 insertions, 2 deletions
diff --git a/engines/prince/option_text.h b/engines/prince/option_text.h
index ac5d7588b3..55fc23770e 100644
--- a/engines/prince/option_text.h
+++ b/engines/prince/option_text.h
@@ -45,7 +45,7 @@ const char optionsTextPL[7][18] = {
// + special letter values changing (with U2 negation)
// Normal value: 196, 214, 220, 223, 228, 246, 252
// Prince change: 131, 132, 133, 127, 128, 129, 130
-// U2 neg: -125, -124, -123, 127, 128, -127, -126
+// U2 neg: -125, -124, -123, 127, -128, -127, -126
char invOptionsTextDE[5][17] = {
"Anschauen",
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 0f52e97e80..95f0068811 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -758,8 +758,41 @@ void PrinceEngine::printAt(uint32 slot, uint8 color, const char *s, uint16 x, ui
debugC(1, DebugChannel::kEngine, "PrinceEngine::printAt slot %d, color %d, x %02d, y %02d, str %s", slot, color, x, y, s);
+ char *destStr = (char *)malloc(strlen(s));
+ strcpy(destStr, s);
+ char *strPointer = destStr;
+
+ if (getLanguage() == Common::DE_DEU) {
+ while (*strPointer) {
+ switch(*strPointer) {
+ case -60:
+ *strPointer = -125;
+ break;
+ case -42:
+ *strPointer = -124;
+ break;
+ case -36:
+ *strPointer = -123;
+ break;
+ case -33:
+ *strPointer = 127;
+ break;
+ case -28:
+ *strPointer = -128;
+ break;
+ case -10:
+ *strPointer = -127;
+ break;
+ case -4:
+ *strPointer = -126;
+ break;
+ }
+ strPointer++;
+ }
+ }
+
Text &text = _textSlots[slot];
- text._str = s;
+ text._str = destStr;
text._x = x;
text._y = y;
text._color = color;