[Scummvm-git-logs] scummvm master -> 691d1dffdb3c112d4febedc333c62edc93250650
bluegr
noreply at scummvm.org
Wed Jul 27 07:58:26 UTC 2022
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:
e30f9e2c35 SCUMM: Fix a possible dead-end in Monkey Island 2 (Ultimate Edition)
abe00b44c9 SCUMM: Restore Captain's Dread reaction when you have the four map pieces
691d1dffdb SCUMM: Improve the antiques dealer map piece workaround (Monkey2)
Commit: e30f9e2c3504fdcb717f6c6d0197b90102707bad
https://github.com/scummvm/scummvm/commit/e30f9e2c3504fdcb717f6c6d0197b90102707bad
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-27T10:58:21+03:00
Commit Message:
SCUMM: Fix a possible dead-end in Monkey Island 2 (Ultimate Edition)
When playing the Regular mode of the Ultimate Talkie Edition of Monkey
Island 2, you can get stuck if you picked up the four map pieces, but
haven't picked up the model lighthouse lens yet. Captain Dread will
force you to go back to Scabb Island and disappear (so you can't go
back to Phatt Island), but Wally won't be able to read the map without
his monocle and without the lens replacement. Nobody wants a dead-end
in a Monkey Island game :)
This commit just short-circuits the checks for the four map pieces if
the lens is still on the model lighthouse, and so you're still free
to navigate between the 3 islands until you pick it up.
This doesn't happen in any other version (yet), because the Ultimate
Edition is the only one which fixed setting the Bit[70] flag when
buying the map piece from the antiques dealer, restoring the reaction
from Captain Dread but unveiling this other, more fatal script
oversight. But we'll need this fix for the other versions anyway,
since I'm going to add the same enhancement in a new commit.
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 68260ee988b..45014b26341 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -725,7 +725,7 @@ void ScummEngine_v5::o5_animateActor() {
return;
}
- // WORKAROUND bug #1339: While on mars, going outside without your helmet
+ // WORKAROUND bug #1339: While on Mars, going outside without your helmet
// (or missing some other part of your "space suite" will cause your
// character to complain ("I can't breathe."). Unfortunately, this is
// coupled with an animate command, making it very difficult to return to
@@ -1501,7 +1501,40 @@ void ScummEngine_v5::o5_isNotEqual() {
}
void ScummEngine_v5::o5_notEqualZero() {
- int a = getVar();
+ int a;
+
+ // WORKAROUND for a possible dead-end in Monkey Island 2. By luck, this
+ // only happens in the Ultimate Talkie Edition (because it fixes another
+ // script error which unveils this one).
+ //
+ // Once Bit[70] has been properly set by one of the configurations above,
+ // Captain Dread will have his intended reaction of forcing you to go back
+ // to Scabb Island, once you've got the four map pieces. But, unless you're
+ // playing in Lite mode, you'll need the lens from the model lighthouse,
+ // otherwise Wally won't be able to read the map, and you'll be completely
+ // stuck on Scabb Island with no way of going back to the Phatt Island
+ // Library, since Dread's ship is gone.
+ //
+ // Not using `_enableEnhancements`, since we always want to solve a dead-end
+ // in a Monkey Island game!
+ if (_game.id == GID_MONKEY2 && ((_roomResource == 22 && vm.slot[_currentScript].number == 202) || (_roomResource == 2 && vm.slot[_currentScript].number == 10002) || vm.slot[_currentScript].number == 97)) {
+ int var = fetchScriptWord();
+ a = readVar(var);
+
+ // If you've got the four map pieces and the script is checking this...
+ if (var == 0x8000 + 69 && a == 1 && readVar(0x8000 + 70) == 1 && readVar(0x8000 + 55) == 1 && readVar(0x8000 + 366) == 1) {
+ // ...but you don't have the lens and you never gave it to Wally...
+ // (and you're not playing the Lite mode, where this doesn't matter)
+ if (getOwner(295) != VAR(VAR_EGO) && readVar(0x8000 + 67) != 0 && readVar(0x8000 + 567) == 0) {
+ // ...then short-cirtcuit this condition, so that you can still go back
+ // to Phatt Island to pick up the lens, as in the original game.
+ a = 0;
+ }
+ }
+ } else {
+ a = getVar();
+ }
+
jumpRelative(a != 0);
}
Commit: abe00b44c98b92181080e5e2d1c7fb3cb16313eb
https://github.com/scummvm/scummvm/commit/abe00b44c98b92181080e5e2d1c7fb3cb16313eb
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-27T10:58:21+03:00
Commit Message:
SCUMM: Restore Captain's Dread reaction when you have the four map pieces
This actually comes from the Ultimate Talkie Edition, so we're just
borrowing their fix for this.
The original scripts check if you have the whole map of Big Whoop; if
that's the case and you go to Captain Dread's ship, he should tell you
that he must go back to Scabb Island, and he'll leave you there and
never appear again. This forces the player to focus on Scabb Island
again, so that you know where to solve the map puzzle.
If you don't remember this, it's because the scripts forget to update
the status of the map piece from the antiques dealer, when you buy it.
So this is what this commit fixes, and this makes the Captain Dread
script trigger as intended.
Note: this REQUIRES the model lighthouse lens fix I've committed just
before, otherwise this would add a dead-end to the game (because of
another original script oversight; see that commit and
o5_notEqualZero() for more information).
We are restoring something which was part of the original intent of
the writers (it has even been dubbed in the Special Edition), but
it's maybe controversial since people never saw this in the original
because of a script bug. That's why this is just an enhancement that
you can disable.
Kudos to the Ultimate Talkie Edition authors for this very nice
finding!
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 45014b26341..5b7476958eb 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1505,7 +1505,8 @@ void ScummEngine_v5::o5_notEqualZero() {
// WORKAROUND for a possible dead-end in Monkey Island 2. By luck, this
// only happens in the Ultimate Talkie Edition (because it fixes another
- // script error which unveils this one).
+ // script error which unveils this one), or if you enable the Enhancement
+ // option in one of the original releases (see o5_stopScript()).
//
// Once Bit[70] has been properly set by one of the configurations above,
// Captain Dread will have his intended reaction of forcing you to go back
@@ -1526,7 +1527,7 @@ void ScummEngine_v5::o5_notEqualZero() {
// ...but you don't have the lens and you never gave it to Wally...
// (and you're not playing the Lite mode, where this doesn't matter)
if (getOwner(295) != VAR(VAR_EGO) && readVar(0x8000 + 67) != 0 && readVar(0x8000 + 567) == 0) {
- // ...then short-cirtcuit this condition, so that you can still go back
+ // ...then short-circuit this condition, so that you can still go back
// to Phatt Island to pick up the lens, as in the original game.
a = 0;
}
@@ -2682,6 +2683,21 @@ void ScummEngine_v5::o5_stopScript() {
stopObjectCode();
else
stopScript(script);
+
+ // WORKAROUND: When Guybrush buys a map piece from the antiques dealer,
+ // the script forgets to set Bit[70], which means that an intended
+ // reaction from Captain Dread forcing you to go back to Scabb when you
+ // get the full map was never triggered in the original game.
+ // The Ultimate Edition fixed this, so we're borrowing its script change.
+ //
+ // Note that fixing this unveils a second, much more problematic script
+ // oversight which could cause a dead-end if you didn't pick up the model
+ // lighthouse lens! See o5_notEqualZero().
+ if (_game.id == GID_MONKEY2 && script == 209 &&
+ _roomResource == 48 && vm.slot[_currentScript].number == 207 && _enableEnhancements &&
+ strcmp(_game.variant, "SE Talkie") != 0) {
+ writeVar(0x8000 + 70, 1);
+ }
}
void ScummEngine_v5::o5_stringOps() {
Commit: 691d1dffdb3c112d4febedc333c62edc93250650
https://github.com/scummvm/scummvm/commit/691d1dffdb3c112d4febedc333c62edc93250650
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-27T10:58:21+03:00
Commit Message:
SCUMM: Improve the antiques dealer map piece workaround (Monkey2)
The Ultimate Talkie Edition fixes this at the source, by setting
Bit[70] as intended when you buy the map piece.
But it makes more sense to fix it at a later stage for us, so that
it will also apply for previous saves (if one enables the Enhancement
option), and so that one can also disable this enhancement just before
meeting Captain Dread at this point, if they prefer to restore the
original behavior of the game.
Again, we're not modding the game here, just restoring an intended
behavior which was hidden by a script error, but people may prefer
playing the game with the original behavior they've known for years
and years.
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 5b7476958eb..c4ef38bf2eb 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1505,8 +1505,8 @@ void ScummEngine_v5::o5_notEqualZero() {
// WORKAROUND for a possible dead-end in Monkey Island 2. By luck, this
// only happens in the Ultimate Talkie Edition (because it fixes another
- // script error which unveils this one), or if you enable the Enhancement
- // option in one of the original releases (see o5_stopScript()).
+ // script error which unveils this one), or when one enables the second
+ // workaround just below in one of the original releases.
//
// Once Bit[70] has been properly set by one of the configurations above,
// Captain Dread will have his intended reaction of forcing you to go back
@@ -1522,8 +1522,27 @@ void ScummEngine_v5::o5_notEqualZero() {
int var = fetchScriptWord();
a = readVar(var);
+ // WORKAROUND: When Guybrush buys a map piece from the antiques dealer,
+ // the script forgets to set Bit[70], which means that an intended
+ // reaction from Captain Dread forcing you to go back to Scabb when you
+ // get the full map was never triggered in the original game.
+ //
+ // The Ultimate Edition fixed this in script 48-207 (when you buy the
+ // map piece), but for the other versions we're fixing it on-the-fly
+ // at the last moment instead (by checking for the object in the
+ // inventory instead of Bit[70]), so that it will also work with older
+ // savegames, and so that you can uncheck the Enhancement option at any
+ // moment if you realize that you want the original behavior.
+ //
+ // Note that fixing this unveils the script error causing the possible
+ // dead-end described above.
+ if (var == 0x8000 + 70 && a == 0 && getOwner(519) == VAR(VAR_EGO) && strcmp(_game.variant, "SE Talkie") != 0 && _enableEnhancements) {
+ a = 1;
+ }
+
+ // [Back to the previous "dead-end" workaround.]
// If you've got the four map pieces and the script is checking this...
- if (var == 0x8000 + 69 && a == 1 && readVar(0x8000 + 70) == 1 && readVar(0x8000 + 55) == 1 && readVar(0x8000 + 366) == 1) {
+ else if (var == 0x8000 + 69 && a == 1 && getOwner(519) == VAR(VAR_EGO) && readVar(0x8000 + 55) == 1 && readVar(0x8000 + 366) == 1) {
// ...but you don't have the lens and you never gave it to Wally...
// (and you're not playing the Lite mode, where this doesn't matter)
if (getOwner(295) != VAR(VAR_EGO) && readVar(0x8000 + 67) != 0 && readVar(0x8000 + 567) == 0) {
@@ -2683,21 +2702,6 @@ void ScummEngine_v5::o5_stopScript() {
stopObjectCode();
else
stopScript(script);
-
- // WORKAROUND: When Guybrush buys a map piece from the antiques dealer,
- // the script forgets to set Bit[70], which means that an intended
- // reaction from Captain Dread forcing you to go back to Scabb when you
- // get the full map was never triggered in the original game.
- // The Ultimate Edition fixed this, so we're borrowing its script change.
- //
- // Note that fixing this unveils a second, much more problematic script
- // oversight which could cause a dead-end if you didn't pick up the model
- // lighthouse lens! See o5_notEqualZero().
- if (_game.id == GID_MONKEY2 && script == 209 &&
- _roomResource == 48 && vm.slot[_currentScript].number == 207 && _enableEnhancements &&
- strcmp(_game.variant, "SE Talkie") != 0) {
- writeVar(0x8000 + 70, 1);
- }
}
void ScummEngine_v5::o5_stringOps() {
More information about the Scummvm-git-logs
mailing list