[Scummvm-git-logs] scummvm branch-2-2 -> 2fb4e72c6ca7323a8ff85b51deb802b508ac5c81

sluicebox 22204938+sluicebox at users.noreply.github.com
Thu Sep 24 12:01:14 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:
2fb4e72c6c SCI: Add workarounds for NRS SQ4 Update 1.3


Commit: 2fb4e72c6ca7323a8ff85b51deb802b508ac5c81
    https://github.com/scummvm/scummvm/commit/2fb4e72c6ca7323a8ff85b51deb802b508ac5c81
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-09-24T04:59:03-07:00

Commit Message:
SCI: Add workarounds for NRS SQ4 Update 1.3

Workarounds for this excellent fan patch were deliberately
excluded because previous versions were distributed with a full
version of the game, but 1.3 is distributed as a true patch set.

Confirmed that this version is now completable.

Changed paths:
    engines/sci/detection_tables.h
    engines/sci/engine/workarounds.cpp
    engines/sci/graphics/picture.cpp


diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index a7779b4bb2..6a99929934 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -5136,8 +5136,11 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		AD_LISTEND},
 		Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO5(GUIO_MIDIGM, GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_MIDI_MODE)	},
 
-	// Space Quest 4 - English DOS CD patch 1.2 (unofficial - NRS) - THIS VERSION IS PIRATED/CRACKED AND REPACKAGED =DO NOT RE-ADD=
-	// In essence, this "patch" includes a mixture the CD and floppy versions (the whole game), without the speech file
+	// Space Quest 4 - English DOS CD "NRS SQ4 Update 1.2" (unofficial patch)
+	// This patch set was distributed as a mixture the CD and floppy versions (the whole game)
+	// without the speech files, at least initially, and so it is not allowed.
+	// Version 1.3 is instead distributed as a set of patches and diffs which require the user
+	// to provide the full CD and floppy versions, and so it is happily supported.
 	{"sq4", "CD", {
 		{"resource.map", 0, "38287a646458a1dabded55d094407793", 7139},
 		{"resource.000", 0, "231fd8421e1f211e1bcf9d7b8b6408e7", 9525849},
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 70f794c00e..cdf3f0a4a8 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -888,11 +888,20 @@ static const uint16 sig_kGraphRedrawBox_sq4_1[] = {
 	SIG_END
 };
 
+// same as above but for NRS SQ4 Update, which has a different first instruction
+static const uint16 sig_kGraphRedrawBox_sq4_2[] = {
+	0x3e, SIG_UINT16(0x0007),        // link 0007
+	0x39, SIG_ADDTOOFFSET(+1),       // pushi 2Ah for PC floppy, pushi 27h for PC CD
+	0x76,                            // push0
+	0x72,                            // lofsa laserSound
+	SIG_END
+};
+
 //                Game: Space Quest 4
 //      Calling method: shootEgoScript::changeState
 //   Subroutine offset: English/German/French/Russian PC floppy, Japanese PC-9801: 0x0f8c, English PC CD: 0x0c4d (script 703)
 // Applies to at least: English/German/French/Russian PC floppy, English PC CD, Japanese PC-9801
-static const uint16 sig_kGraphRedrawBox_sq4_2[] = {
+static const uint16 sig_kGraphRedrawBox_sq4_3[] = {
 	0x3f, 0x03,                      // link 03
 	0x39, SIG_ADDTOOFFSET(+1),       // pushi [ number ]
 	0x78,                            // push1
@@ -900,6 +909,15 @@ static const uint16 sig_kGraphRedrawBox_sq4_2[] = {
 	SIG_END
 };
 
+// same as above but for NRS SQ4 Update, which has a different first instruction
+static const uint16 sig_kGraphRedrawBox_sq4_4[] = {
+	0x3e, SIG_UINT16(0x0003),        // link 0003
+	0x39, SIG_ADDTOOFFSET(+1),       // pushi [ number ]
+	0x78,                            // push1
+	0x39, 0x69,                      // pushi 69h
+	SIG_END
+};
+
 //    gameID,           room,script,lvl,          object-name, method-name,        local-call-signature, index-range,   workaround
 const SciWorkaroundEntry kGraphRedrawBox_workarounds[] = {
 	{ GID_SQ4,           405,   405,  0,       "swimAfterEgo", "changeState",                      NULL,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air - accidental additional parameter specified
@@ -914,8 +932,10 @@ const SciWorkaroundEntry kGraphRedrawBox_workarounds[] = {
 	{ GID_SQ4,            -1,   411,  0,                   "", "changeState",                      NULL,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // skateOrama when "swimming" in the air... Russian version - bug #5573
 	{ GID_SQ4,           150,   150,  0,        "laserScript", "changeState", sig_kGraphRedrawBox_sq4_1,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // when visiting the pedestral where Roger Jr. is trapped, before trashing the brain icon in the programming chapter, accidental additional parameter specified - bug #5479, German - bug #5527
 	{ GID_SQ4,           150,   150,  0,                   "", "changeState", sig_kGraphRedrawBox_sq4_1,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for the Russian version - bug #5573
-	{ GID_SQ4,            -1,   703,  0,     "shootEgoScript", "changeState", sig_kGraphRedrawBox_sq4_2,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // estros when getting shot by the police - accidental additional parameter specified
-	{ GID_SQ4,            -1,   703,  0,                   "", "changeState", sig_kGraphRedrawBox_sq4_2,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for the Russian version
+	{ GID_SQ4,           150,   150,  0,        "laserScript", "changeState", sig_kGraphRedrawBox_sq4_2,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for NRS SQ4 Update
+	{ GID_SQ4,            -1,   703,  0,     "shootEgoScript", "changeState", sig_kGraphRedrawBox_sq4_3,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // estros when getting shot by the police - accidental additional parameter specified
+	{ GID_SQ4,            -1,   703,  0,                   "", "changeState", sig_kGraphRedrawBox_sq4_3,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for the Russian version
+	{ GID_SQ4,            -1,   703,  0,     "shootEgoScript", "changeState", sig_kGraphRedrawBox_sq4_4,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // same as above, for NRS SQ4 Update
 	{ GID_SQ4,            -1,   704,  0,           "shootEgo", "changeState",                      NULL,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // When shot by Droid in Super Computer Maze (Rooms 500, 505, 510...) - accidental additional parameter specified
 	{ GID_KQ5,            -1,   981,  0,           "myWindow",     "dispose",                      NULL,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing any dialog box, accidental additional parameter specified - bug #5031
 	{ GID_KQ5,            -1,   995,  0,               "invW",        "doit",                      NULL,     0,     0, { WORKAROUND_STILLCALL, 0 } }, // Happens in the floppy version, when closing the inventory window, accidental additional parameter specified
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 1c82bbefc8..6ff659ec2f 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -562,7 +562,7 @@ void GfxPicture::drawVectorData(const SciSpan<const byte> &data) {
 					case 35:
 					case 381:
 					case 376:
-					//case 390:	// in the blacklisted NRS patch 1.2 (bug #3615060)
+					case 390: // NRS SQ4 Update patch
 						return;
 					default:
 						break;




More information about the Scummvm-git-logs mailing list