From 0069281c0901d194035c937d221a1386d1fe8386 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Sun, 11 Aug 2019 21:40:16 -0700 Subject: SCI: Fix SQ4CD hintbook text layout Fixes #11070 --- engines/sci/engine/message.cpp | 11 ++++++++--- 1 file 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)) -- cgit v1.2.3