diff options
author | sluicebox | 2019-04-05 19:23:37 -0700 |
---|---|---|
committer | Filippos Karapetis | 2019-04-06 15:01:49 +0300 |
commit | 7353524d89f2a6e05173cae6723928faadd17f9f (patch) | |
tree | ec0362c65728270f1fdc08785bd32086baa128a5 /engines | |
parent | 4e75b7e6b760f9fb3959b54ff0c7e3b8118023c4 (diff) | |
download | scummvm-rg350-7353524d89f2a6e05173cae6723928faadd17f9f.tar.gz scummvm-rg350-7353524d89f2a6e05173cae6723928faadd17f9f.tar.bz2 scummvm-rg350-7353524d89f2a6e05173cae6723928faadd17f9f.zip |
SCI: Fix LONGBOW broken pub messages
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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++) |