aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorMartin Kiewitz2015-10-06 00:18:06 +0200
committerMartin Kiewitz2015-10-06 00:18:06 +0200
commitf70159b9a2407e61a53c6f441fff8fb307575992 (patch)
treec526cea31e93eefb134af8d215a4d7bca8a41f25 /engines/sherlock
parent081fe30ce0436f60cb1d6123cd5f1a246468cca2 (diff)
downloadscummvm-rg350-f70159b9a2407e61a53c6f441fff8fb307575992.tar.gz
scummvm-rg350-f70159b9a2407e61a53c6f441fff8fb307575992.tar.bz2
scummvm-rg350-f70159b9a2407e61a53c6f441fff8fb307575992.zip
SHERLOCK: SS: show inv. exclam. mark in dialog
remove the possible opcode check, that was added to fix the Spanish version crash during the alley room. We now have support for the inverted exclamation mark and we want to show that character. This also shows the inverted question mark. See bug #6931 If there are any more invalid characters, this commit may cause assert()s in fonts.cpp again.
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/talk.cpp37
1 files changed, 26 insertions, 11 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 4150835fb8..60e7dc43b9 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -750,17 +750,32 @@ void Talk::doScript(const Common::String &script) {
// Start of comment, so skip over it
while (*str++ != '}')
;
- } else if (isPossibleOpcode(c)) {
- if (isOpcode(c)) {
- // Handle control code
- switch ((this->*_opcodeTable[c - _opcodes[0]])(str)) {
- case RET_EXIT:
- return;
- case RET_CONTINUE:
- continue;
- default:
- break;
- }
+ } else if (isOpcode(c)) {
+ // the original interpreter checked for c being >= 0x80
+ // and if that is the case, it tried to process it as opcode, BUT ALSO ALWAYS skipped over it
+ // This was done inside the Spanish + German interpreters of Serrated Scalpel, not the original
+ // English interpreter (reverse engineered from the binaries).
+ //
+ // This resulted in special characters not getting shown in case they occurred at the start
+ // of sentences like for example the inverted exclamation mark and the inverted question mark.
+ // For further study see fonts.cpp
+ //
+ // We create an inverted exclamation mark for the Spanish version and we show it.
+ //
+ // Us not skipping over those characters may result in an assert() happening inside fonts.cpp
+ // in case more invalid characters exist.
+ // More information see bug #6931
+ //
+ //} else if (isPossibleOpcode(c)) {
+
+ // Handle control code
+ switch ((this->*_opcodeTable[c - _opcodes[0]])(str)) {
+ case RET_EXIT:
+ return;
+ case RET_CONTINUE:
+ continue;
+ default:
+ break;
}
++str;