[Scummvm-git-logs] scummvm master -> 80d870e24956e536001e88e0e1873a2f36e3622d

sluicebox 22204938+sluicebox at users.noreply.github.com
Thu Jul 9 22:34:57 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
80d870e249 SCI: Fix Polish fonts in LSL2 and LSL3


Commit: 80d870e24956e536001e88e0e1873a2f36e3622d
    https://github.com/scummvm/scummvm/commit/80d870e24956e536001e88e0e1873a2f36e3622d
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-07-09T15:33:51-07:00

Commit Message:
SCI: Fix Polish fonts in LSL2 and LSL3

Fixes bug #10509

Changed paths:
    engines/sci/detection_tables.h
    engines/sci/resource_patcher.cpp


diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 2b333d47bc..82d0f33916 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -2444,6 +2444,27 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		AD_LISTEND},
 		Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO_STD16_UNDITHER	},
 
+	// Larry 2 - Polish DOS (from Polish Leisure Suit Larry Collection, official release)
+	// Game version 1.002.000
+	// SCI interpreter version 0.000.409, localized resources are all patch files.
+	// resource_patcher.cpp depends on this entry to fix corrupt Polish fonts.
+	{"lsl2", "", {
+		{"resource.map", 0, "42258cf767a8ebaa9e66b6151a80e601", 5628},
+		{"resource.001", 0, "4a24443a25e2b1492462a52809605dc2", 143847},
+		{"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 348331},
+		{"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 236550},
+		{"resource.004", 0, "4a24443a25e2b1492462a52809605dc2", 204861},
+		{"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732},
+		{"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683},
+		// Polish fonts
+		{"font.000",     0, "8b65d8ee6d6041f3ac387d32c759165f", 1919},
+		{"font.001",     0, "48356355a52bb14df7bdaa253d20b26a", 1705},
+		{"font.004",     0, "3ce72dd3e8396f7d0fb81a37f4966a8a", 1458},
+		{"font.007",     0, "29afa8f8d5a211b15885b8f4d90cc2ee", 4029},
+		{"font.999",     0, "54801847b35893632a131171b9cebc15", 1368},
+		AD_LISTEND},
+		Common::PL_POL, Common::kPlatformDOS, 0, GUIO_STD16_UNDITHER	},
+
 	// Larry 3 - English Amiga (from www.back2roots.org)
 	// Executable scanning reports "1.002.032"
 	// SCI interpreter version 0.000.685
@@ -2608,6 +2629,26 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		AD_LISTEND},
 		Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO_STD16	},
 
+	// Larry 3 - Polish DOS (from Polish Leisure Suit Larry Collection, official release)
+	// Game version 1.021
+	// SCI interpreter version 0.000.572, localized resources are all patch files.
+	// resource_patcher.cpp depends on this entry to fix corrupt Polish fonts.
+	{"lsl3", "", {
+		{"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916},
+		{"resource.001", 0, "f18441027154292836b973c655fa3175", 456722},
+		{"resource.002", 0, "f18441027154292836b973c655fa3175", 578024},
+		{"resource.003", 0, "f18441027154292836b973c655fa3175", 506807},
+		{"resource.004", 0, "f18441027154292836b973c655fa3175", 513651},
+		// Polish fonts
+		{"font.000",     0, "8b65d8ee6d6041f3ac387d32c759165f", 1919},
+		{"font.001",     0, "48356355a52bb14df7bdaa253d20b26a", 1705},
+		{"font.004",     0, "3ce72dd3e8396f7d0fb81a37f4966a8a", 1458},
+		{"font.007",     0, "4341dc13d2be54bf80bb1cbd59aede4c", 4757},
+		{"font.009",     0, "aec40fb5c623ba23bd12123edcf84d7f", 3683},
+		{"font.999",     0, "54801847b35893632a131171b9cebc15", 1368},
+		AD_LISTEND},
+		Common::PL_POL, Common::kPlatformDOS, 0, GUIO_STD16_UNDITHER	},
+
 	// Larry 5 - English Amiga
 	// Executable scanning reports "1.004.023"
 	// SCI interpreter version 1.000.784
diff --git a/engines/sci/resource_patcher.cpp b/engines/sci/resource_patcher.cpp
index b4a5cb65c0..ca93713986 100644
--- a/engines/sci/resource_patcher.cpp
+++ b/engines/sci/resource_patcher.cpp
@@ -109,6 +109,24 @@ static const byte lsl1RussianSound205[] = {
 	END
 };
 
+
+#pragma mark -
+#pragma mark Leisure Suit Larry 2 and 3
+
+// LSL2 and LSL3 Polish contain several corrupt fonts. In each of these, the
+//  offset for the final font entry (127) points beyond the end of the file.
+//  This would have been a problem for Sierra's intepreter except that it
+//  only parses characters when they're drawn and these games don't use
+//  character 127, which is blank in the Polish fonts that aren't corrupt.
+//  We parse and cache all characters up front so this is a problem for us.
+//  We fix it here by patching the character count in the header from 128 down
+//  to 127 so that the corrupt entries aren't processed. Bug #10509
+static const byte lsl2Lsl3PolishFont[] = {
+	SKIP(0x02),
+	REPLACE(1, 0x7F),
+	END
+};
+
 #pragma mark -
 #pragma mark Phantasmagoria
 
@@ -401,6 +419,10 @@ static const byte pq4EnhancedAudioToggleView[] = {
 
 static const GameResourcePatch resourcePatches[] = {
 	{ GID_LSL1,           Common::RU_RUS,   ResourceId(kResourceTypeSound,   205), lsl1RussianSound205,        false },
+	{ GID_LSL2,           Common::PL_POL,   ResourceId(kResourceTypeFont,      1), lsl2Lsl3PolishFont,         false },
+	{ GID_LSL2,           Common::PL_POL,   ResourceId(kResourceTypeFont,      7), lsl2Lsl3PolishFont,         false },
+	{ GID_LSL3,           Common::PL_POL,   ResourceId(kResourceTypeFont,      1), lsl2Lsl3PolishFont,         false },
+	{ GID_LSL3,           Common::PL_POL,   ResourceId(kResourceTypeFont,      9), lsl2Lsl3PolishFont,         false },
 	{ GID_PHANTASMAGORIA, Common::UNK_LANG, ResourceId(kResourceTypeView,  64001), phant1View64001Palette,     false },
 	{ GID_PQ4,            Common::EN_ANY,   ResourceId(kResourceTypeView,  10988), pq4EnhancedAudioToggleView, true }
 };




More information about the Scummvm-git-logs mailing list