[Scummvm-git-logs] scummvm branch-2-1 -> ea409c1b2dbf5beebdda79fc8f67275b20cd54d8

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


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

Summary:
24ceca5178 SCI: Ignore incorrectly detected volume version
c6ae342aea SCI: Fix SQ1VGA Russian class names
ea409c1b2d NEWS: Update SCI with SQ1VGA Russian support


Commit: 24ceca517873cc16b63dd66479096db954aa9bee
    https://github.com/scummvm/scummvm/commit/24ceca517873cc16b63dd66479096db954aa9bee
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-01-10T16:55:24-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 765747b..b015b84 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: c6ae342aeac5c0d3271ef5463812040b140124ac
    https://github.com/scummvm/scummvm/commit/c6ae342aeac5c0d3271ef5463812040b140124ac
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-01-10T16:55:33-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 f6c3658..485d82a 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -17088,12 +17088,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
 };
 


Commit: ea409c1b2dbf5beebdda79fc8f67275b20cd54d8
    https://github.com/scummvm/scummvm/commit/ea409c1b2dbf5beebdda79fc8f67275b20cd54d8
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-01-10T16:57:06-08:00

Commit Message:
NEWS: Update SCI with SQ1VGA Russian support

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 5671ad1..505baed 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -25,6 +25,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Added support for Polish LSL7.
    - Added support for Italian GK2.
    - Added support for Russian KQ7.
+   - Added support for Russian SQ1VGA.
    - Added support for GK2 fan-made subtitle patches.
 
  SCUMM:




More information about the Scummvm-git-logs mailing list