PRINCE: German special letters fix in intro - printAt function

This commit is contained in:
lukaslw 2014-06-14 16:29:49 +02:00
parent db19f9282c
commit 9e94888fa2
2 changed files with 35 additions and 2 deletions

View File

@ -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",

View File

@ -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;