aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsluicebox2019-08-11 21:40:16 -0700
committerFilippos Karapetis2019-08-12 09:27:35 +0300
commit0069281c0901d194035c937d221a1386d1fe8386 (patch)
tree8dc54ba81f02fb890c664cc95cd78edba4bc6e65
parent8d648b5b7ee235581a1d1c204b4941cd3e67fa8f (diff)
downloadscummvm-rg350-0069281c0901d194035c937d221a1386d1fe8386.tar.gz
scummvm-rg350-0069281c0901d194035c937d221a1386d1fe8386.tar.bz2
scummvm-rg350-0069281c0901d194035c937d221a1386d1fe8386.zip
SCI: Fix SQ4CD hintbook text layout
Fixes #11070
-rw-r--r--engines/sci/engine/message.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index dbb936263e..6af207add7 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -453,9 +453,14 @@ Common::String MessageState::processString(const char *s, uint32 maxLength) {
uint index = 0;
while (index < inStr.size() && index < maxLength) {
- // Check for hex escape sequence
- if (stringHex(outStr, inStr, index))
- continue;
+ // Check for hex escape sequence.
+ // SQ4CD predates this interpreter feature but has a message on the
+ // hintbook screen which appears to contain hex strings and renders
+ // incorrectly if converted, so exclude it. Fixes #11070
+ if (g_sci->getGameId() != GID_SQ4) {
+ if (stringHex(outStr, inStr, index))
+ continue;
+ }
// Check for literal escape sequence
if (stringLit(outStr, inStr, index))