[Scummvm-git-logs] scummvm master -> 69576123b802b6370ce2febd64282bb637c989e8
sluicebox
22204938+sluicebox at users.noreply.github.com
Mon Jun 14 19:29:32 UTC 2021
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:
b181967e10 SCI: Remove unused variable
60f389b37d SCI: Fix comment typo
69576123b8 SCI: Document SQ1 droid script patch
Commit: b181967e103e2a72282dbc5763eba262552fce1b
https://github.com/scummvm/scummvm/commit/b181967e103e2a72282dbc5763eba262552fce1b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-06-14T14:29:15-05:00
Commit Message:
SCI: Remove unused variable
Changed paths:
engines/sci/resource/resource.cpp
diff --git a/engines/sci/resource/resource.cpp b/engines/sci/resource/resource.cpp
index eef3f9ea67..a192e1effa 100644
--- a/engines/sci/resource/resource.cpp
+++ b/engines/sci/resource/resource.cpp
@@ -1723,9 +1723,7 @@ void ResourceManager::readResourcePatchesBase36() {
// whereas sync36 start with a '#'. Mac versions begin with 'A' (probably meaning AIFF). Torin
// has several that begin with 'B'.
- Common::String name, inputName;
Common::ArchiveMemberList files;
- ResourceSource *psrcPatch;
for (int i = kResourceTypeAudio36; i <= kResourceTypeSync36; ++i) {
files.clear();
@@ -1745,7 +1743,7 @@ void ResourceManager::readResourcePatchesBase36() {
}
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
- name = (*x)->getName();
+ Common::String name = (*x)->getName();
name.toUppercase();
// The S/T prefixes often conflict with non-patch files and generate
@@ -1786,7 +1784,7 @@ void ResourceManager::readResourcePatchesBase36() {
delete stream;
}
- psrcPatch = new PatchResourceSource(name);
+ ResourceSource *psrcPatch = new PatchResourceSource(name);
processPatch(psrcPatch, (ResourceType)i, resource36.getNumber(), resource36.getTuple());
}
}
Commit: 60f389b37dec0db11b509b6451954aa975bb86ff
https://github.com/scummvm/scummvm/commit/60f389b37dec0db11b509b6451954aa975bb86ff
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-06-14T14:29:15-05:00
Commit Message:
SCI: Fix comment typo
Changed paths:
engines/sci/engine/vm_types.cpp
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp
index b2e250ab8b..7387afd58a 100644
--- a/engines/sci/engine/vm_types.cpp
+++ b/engines/sci/engine/vm_types.cpp
@@ -247,7 +247,7 @@ int reg_t::sci32Comparison(const reg_t right) const {
// engine compares these as a tiebreaker for graphics objects that are at
// the same priority, and it is necessary to at least minimally handle
// this situation.
- // This is obviously a bogus comparision, but then, this entire thing is
+ // This is obviously a bogus comparison, but then, this entire thing is
// bogus. For the moment, it just needs to be deterministic.
if (isNumber() && !right.isNumber()) {
return 1;
Commit: 69576123b802b6370ce2febd64282bb637c989e8
https://github.com/scummvm/scummvm/commit/69576123b802b6370ce2febd64282bb637c989e8
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-06-14T14:29:16-05:00
Commit Message:
SCI: Document SQ1 droid script patch
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 067a6d1db0..cc565ee73e 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -117,7 +117,6 @@ static const char *const selectorNameTable[] = {
"solvePuzzle", // Quest For Glory 3
"curIcon", // Quest For Glory 3, QFG4
"curInvIcon", // Quest For Glory 3, QFG4
- "timesShownID", // Space Quest 1 VGA
"startText", // King's Quest 6 CD / Laura Bow 2 CD for audio+text support
"startAudio", // King's Quest 6 CD / Laura Bow 2 CD for audio+text support
"modNum", // King's Quest 6 CD / Laura Bow 2 CD for audio+text support
@@ -242,7 +241,6 @@ enum ScriptPatcherSelectors {
SELECTOR_solvePuzzle,
SELECTOR_curIcon,
SELECTOR_curInvIcon,
- SELECTOR_timesShownID,
SELECTOR_startText,
SELECTOR_startAudio,
SELECTOR_modNum,
@@ -19538,12 +19536,21 @@ static const uint16 sq1vgaPatchUlenceFlatsGeneratorGlitch[] = {
PATCH_END
};
-// No documentation for this patch (TODO)
+// Showing the Sarien droid the ID card three times is supposed to kill you,
+// but the script is missing a line and compares the number three against the
+// DeltaurRegion class instead of its timesShownID property. In SSCI this
+// comparison happened to pass and you would never be killed. In ScummVM,
+// comparing this object to an integer fails and you're killed the first time.
+//
+// We fix this by re-ordering the instructions so that timesShownID is tested
+// correctly. Sierra fixed this in later versions.
+//
+// Applies to at least: English PC VGA
+// Responsible method: egoShowsCard:changeState(2)
static const uint16 sq1vgaSignatureEgoShowsCard[] = {
- SIG_MAGICDWORD,
- 0x38, SIG_SELECTOR16(timesShownID), // pushi timesShownID
+ 0x38, SIG_ADDTOOFFSET(+2), // pushi timesShownID
0x78, // push1
- 0x38, SIG_SELECTOR16(timesShownID), // pushi timesShownID
+ 0x38, SIG_ADDTOOFFSET(+2), // pushi timesShownID
0x76, // push0
0x51, 0x7c, // class DeltaurRegion
0x4a, 0x04, // send 0x04 (get timesShownID)
@@ -19552,17 +19559,15 @@ static const uint16 sq1vgaSignatureEgoShowsCard[] = {
0x02, // add
0x36, // push
0x51, 0x7c, // class DeltaurRegion
- 0x4a, 0x06, // send 0x06 (set timesShownID)
+ 0x4a, SIG_MAGICDWORD, 0x06, // send 0x06 (set timesShownID)
0x36, // push (wrong, acc clobbered by class, above)
0x35, 0x03, // ldi 0x03
0x22, // lt?
SIG_END
};
-// Note that this script patch is merely a reordering of the
-// instructions in the original script.
static const uint16 sq1vgaPatchEgoShowsCard[] = {
- 0x38, PATCH_SELECTOR16(timesShownID), // pushi timesShownID
+ 0x38, PATCH_GETORIGINALUINT16(+1), // pushi timesShownID
0x76, // push0
0x51, 0x7c, // class DeltaurRegion
0x4a, 0x04, // send 0x04 (get timesShownID)
@@ -19570,7 +19575,7 @@ static const uint16 sq1vgaPatchEgoShowsCard[] = {
0x35, 0x01, // ldi 1
0x02, // add
0x36, // push (this push corresponds to the wrong one above)
- 0x38, PATCH_SELECTOR16(timesShownID), // pushi timesShownID
+ 0x38, PATCH_GETORIGINALUINT16(+1), // pushi timesShownID
0x78, // push1
0x36, // push
0x51, 0x7c, // class DeltaurRegion
More information about the Scummvm-git-logs
mailing list