From d6347269eba08d0f7ad717df043a84b95e6836b0 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Fri, 7 Aug 2015 22:00:42 +0200 Subject: 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. --- engines/sherlock/fonts.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 440e31915c..482e795b6d 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -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 + // 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 (c >= 0x80) { // German SH1 version did this - c--; + 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; } -- cgit v1.2.3