SHERLOCK: RT: impl. font-char mapping / bug #6882

Rose Tattoo did different font char mapping for at least
the German version of the game (can't verify anything else).
RT seems to map 0xE1 only, but to a different character
and other upper characters (>= 0x80) are not mapped at all.

this fixes broken special characters in RT.
This commit is contained in:
Martin Kiewitz 2015-08-07 22:00:42 +02:00
parent 2696be83c0
commit d6347269eb

View File

@ -109,16 +109,23 @@ inline byte Fonts::translateChar(byte c) {
return 0; // translate to first actual character
case 225:
// This was done in the German interpreter
// happens when talking to the kid in the 2nd room
return 135; // special handling for 0xE1
default:
if (c >= 0x80) { // German SH1 version did this
c--;
// SH1: happens, when talking to the kid in the 2nd room
// SH2: happens, when looking at the newspaper right at the start in the backalley
// Special handling for 0xE1 (German Sharp-S character)
if (IS_ROSE_TATTOO) {
return 136; // it got translated to this for SH2
}
return 135; // and this for SH1
default:
if (IS_SERRATED_SCALPEL) {
if (c >= 0x80) { // German SH1 version did this, but not German SH2
c--;
}
// Spanish SH1 did this (reverse engineered code)
//if ((c >= 0xA0) && (c <= 0xAD) || (c == 0x82)) {
// c--;
//}
}
// Spanish SH1 did this (reverse engineered code)
//if ((c >= 0xA0) && (c <= 0xAD) || (c == 0x82)) {
// c--;
//}
assert(c > 32); // anything above space is allowed
return c - 33;
}