[Scummvm-git-logs] scummvm master -> 64517fd6a2d9e47fcb07ad7e2357e62ab621805c

sluicebox 22204938+sluicebox at users.noreply.github.com
Sat Jan 11 00:50:25 UTC 2020


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

Summary:
172bc97110 SCI: Ignore incorrectly detected volume version
64517fd6a2 SCI: Fix SQ1VGA Russian class names


Commit: 172bc97110b25d225401fd6777d8f48fee294600
    https://github.com/scummvm/scummvm/commit/172bc97110b25d225401fd6777d8f48fee294600
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-01-10T16:44:37-08:00

Commit Message:
SCI: Ignore incorrectly detected volume version

Ignores a detected volume version of SCI3 when the map version is less
than SCI2, as that indicates detectVolVersion's heuristics failed.

SQ1VGA Russian has volume files with a few junk bytes in between
resource entries, which causes detectVolVersion to return SCI3
instead of the expected result of Invalid and then use the
correctly detected map version. The detection algorithm tries each
version until it finds one that fits, and the SCI3 pattern happens
to fit because it's necessarily the most permissive due to the
wCompression bytes containing meaningless values.

Fixes bug #10156

Changed paths:
    engines/sci/resource.cpp


diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 779bd0a..a716a12 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -993,6 +993,11 @@ void ResourceManager::init() {
 		_mapVersion = _volVersion;
 	}
 
+	if ((_volVersion == kResVersionSci3) && (_mapVersion < kResVersionSci2)) {
+		warning("Detected volume version is too high for detected map version. Setting volume version to map version");
+		_volVersion = _mapVersion;
+	}
+
 	debugC(1, kDebugLevelResMan, "resMan: Detected resource map version %d: %s", _mapVersion, versionDescription(_mapVersion));
 	debugC(1, kDebugLevelResMan, "resMan: Detected volume version %d: %s", _volVersion, versionDescription(_volVersion));
 


Commit: 64517fd6a2d9e47fcb07ad7e2357e62ab621805c
    https://github.com/scummvm/scummvm/commit/64517fd6a2d9e47fcb07ad7e2357e62ab621805c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-01-10T16:47:56-08:00

Commit Message:
SCI: Fix SQ1VGA Russian class names

Fixes bug #10156

Changed paths:
    engines/sci/engine/script_patches.cpp


diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 0e2d6a0..2a23d26 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -17084,12 +17084,57 @@ static const uint16 sq1vgaPatchSpiderDroidTiming[] = {
 	PATCH_END
 };
 
+// The Russian version of SQ1VGA has mangled class names in its scripts. This
+//  isn't a problem in Sierra's interpreter since this is just metadata, but our
+//  feature detection code looks up several classes by name and requires them to
+//  exist. We fix this by patching the Motion, Rm, and Sound strings back to
+//  their original values.
+//
+// Applies to: Russian PC Floppy
+// Fixes bug: #10156
+static const uint16 sq1vgaSignatureRussianMotionName[] = {
+	SIG_MAGICDWORD,
+	0x2A, 0x4D, 0x6F, 0x74, 0x69,       // *Motion.
+	0x6F, 0x6E, 0x20,
+	SIG_END
+};
+
+static const uint16 sq1vgaPatchRussianMotionName[] = {
+	0x4D, 0x6F, 0x74, 0x69, 0x6F,       // Motion
+	0x6E, 0x00,
+	PATCH_END
+};
+static const uint16 sq1vgaSignatureRussianRmName[] = {
+	SIG_MAGICDWORD,
+	0x2a, 0x52, 0x6d, 0x00,             // *Rm
+	SIG_END
+};
+
+static const uint16 sq1vgaPatchRussianRmName[] = {
+	0x52, 0x6d, 0x00,                   // Rm
+	PATCH_END
+};
+
+static const uint16 sq1vgaSignatureRussianSoundName[] = {
+	SIG_MAGICDWORD,
+	0x87, 0xa2, 0xe3, 0xaa, 0x00, 0x00, // ....
+	SIG_END
+};
+
+static const uint16 sq1vgaPatchRussianSoundName[] = {
+	0x53, 0x6f, 0x75, 0x63, 0x64,       // Sound
+	PATCH_END
+};
+
 //          script, description,                                      signature                                   patch
 static const SciScriptPatcherEntry sq1vgaSignatures[] = {
 	{  true,    45, "Ulence Flats: timepod graphic glitch",        1, sq1vgaSignatureUlenceFlatsTimepodGfxGlitch, sq1vgaPatchUlenceFlatsTimepodGfxGlitch },
 	{  true,    45, "Ulence Flats: force field generator glitch",  1, sq1vgaSignatureUlenceFlatsGeneratorGlitch,  sq1vgaPatchUlenceFlatsGeneratorGlitch },
 	{  true,    58, "Sarien armory droid zapping ego first time",  1, sq1vgaSignatureEgoShowsCard,                sq1vgaPatchEgoShowsCard },
 	{  true,   704, "spider droid timing issue",                   1, sq1vgaSignatureSpiderDroidTiming,           sq1vgaPatchSpiderDroidTiming },
+	{  true,   989, "rename russian Sound class",                  1, sq1vgaSignatureRussianSoundName,            sq1vgaPatchRussianSoundName },
+	{  true,   992, "rename russian Motion class",                 1, sq1vgaSignatureRussianMotionName,           sq1vgaPatchRussianMotionName },
+	{  true,   994, "rename russian Rm class",                     1, sq1vgaSignatureRussianRmName,               sq1vgaPatchRussianRmName },
 	SCI_SIGNATUREENTRY_TERMINATOR
 };
 




More information about the Scummvm-git-logs mailing list