From 7353524d89f2a6e05173cae6723928faadd17f9f Mon Sep 17 00:00:00 2001 From: sluicebox Date: Fri, 5 Apr 2019 19:23:37 -0700 Subject: SCI: Fix LONGBOW broken pub messages --- engines/sci/engine/kernel.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'engines') diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 29d16ab753..44eb816a7d 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -905,6 +905,22 @@ Common::String Kernel::lookupText(reg_t address, int index) { int textlen = textres->size(); const char *seeker = (const char *)textres->getUnsafeDataAt(0); + if (g_sci->getGameId() == GID_LONGBOW && address.getOffset() == 1535 && textlen == 2662) { + // WORKAROUND: Longbow 1.0's text resource 1535 is missing 8 texts for + // the pub. It appears that only the 5.25 floppy release was affected. + // This was fixed by Sierra's 1.0 patch. + if (index >= 41) { + // texts 41+ exist but with incorrect offsets + index -= 8; + } else if (index >= 33) { + // texts 33 through 40 are missing. they comprise two sequences of + // four messages. only one of the two can play, and only once in + // the specific circumstance that the player enters the pub as a + // merchant, changes beards, and re-enters. + return "** MISSING MESSAGE **"; + } + } + int _index = index; while (index--) while (textlen-- && *seeker++) -- cgit v1.2.3