[Scummvm-git-logs] scummvm master -> b215d499f61ceac36a0fe607cd56d49eb8fe6a00
bluegr
noreply at scummvm.org
Sat May 31 19:46:39 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b215d499f6 SCUMM: Fix MI1 storekeeper line being skipped (original script error)
Commit: b215d499f61ceac36a0fe607cd56d49eb8fe6a00
https://github.com/scummvm/scummvm/commit/b215d499f61ceac36a0fe607cd56d49eb8fe6a00
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-05-31T22:46:35+03:00
Commit Message:
SCUMM: Fix MI1 storekeeper line being skipped (original script error)
When Guybrush needs to get a credit note from the storekeeper, he may
pretend having various jobs; one of the options is him saying he's
"waiting tables at the Scumm Bar".
But then, one of the storekeeper's line was cut, because of a missing
WaitForMessage() call before endCutscene(), in script 30-11.
(Thanks to erik for reporting that VAR_OVERRIDE has to be taken care
of as well.)
Fixed by LogicDeluxe in the Ultimate Talkie version, back in 2010.
Changed paths:
engines/scumm/script_v5.cpp
engines/scumm/scumm_v5.h
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 0e35654e987..2e1ba5fea05 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -953,6 +953,9 @@ void ScummEngine_v5::o5_cutscene() {
}
void ScummEngine_v5::o5_endCutscene() {
+ if (workaroundMonkey1StorekeeperWaitTablesLine())
+ return;
+
endCutscene();
}
@@ -3833,6 +3836,49 @@ void ScummEngine_v5::workaroundLoomHetchelDoubleHead(Actor *a, int act) {
}
}
+bool ScummEngine_v5::workaroundMonkey1StorekeeperWaitTablesLine() {
+ // WORKAROUND: When Guybrush must get a credit note from the storekeeper,
+ // he may pretend his job's to wait tables at the Scumm Bar. But in this
+ // case, one of the reaction lines from the storekeeper is never displayed,
+ // because of a missing WaitForMessage() call. And we really don't want
+ // to miss any of his wonderful disparaging comments...
+ //
+ // Fixed in the Ultimate Talkie Edition by LogicDeLuxe.
+ if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_MONKEY && !(_game.features & GF_ULTIMATE_TALKIE))) &&
+ _roomResource == 30 && currentScriptSlotIs(211) &&
+ enhancementEnabled(kEnhRestoredContent)) {
+ const int questionVarNo = (_game.version == 5) ? 194 : 193;
+
+ // Guybrush must have said he was interested in procuring credit
+ // (Bit[28] && !Bit[320])
+ if (readVar(ROOM_VAL(28)) != 1 || readVar(ROOM_VAL(320)) != 0)
+ return false;
+
+ // The storekeeper must have asked Guybrush about his job (Bit[101]),
+ // and he also has to be the last one speaking (act. 11)
+ if (readVar(ROOM_VAL(101)) != 1 || _actorToPrintStrFor != 11)
+ return false;
+
+ // Guybrush must have said he was "waiting tables" (Var[193] == 121,
+ // or VAR[194] == 121, depending on SCUMM v4/v5)
+ if (VAR(questionVarNo) != 121)
+ return false;
+
+ // The player isn't trying to skip the cutscene
+ if (VAR(VAR_OVERRIDE))
+ return false;
+
+ // All good; simulate missing WaitForMessage()
+ if (VAR(VAR_HAVE_MSG)) {
+ _scriptPointer--;
+ o5_breakHere();
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool ScummEngine_v5::workaroundMonkey1JollyRoger(byte callerOpcode, int arg) {
// WORKAROUND: There's a continuity error in Monkey 1, in that the Jolly Roger should
// only appear in the *first* scene showing the Sea Monkey in the middle of the sea,
diff --git a/engines/scumm/scumm_v5.h b/engines/scumm/scumm_v5.h
index ce0f94b60c7..95865e4277b 100644
--- a/engines/scumm/scumm_v5.h
+++ b/engines/scumm/scumm_v5.h
@@ -96,6 +96,7 @@ protected:
void workaroundIndy3TownsMissingLightningCastle(int sound);
void workaroundLoomHetchelDoubleHead(Actor *a, int act);
bool workaroundMonkey1JollyRoger(byte callerOpcode, int arg);
+ bool workaroundMonkey1StorekeeperWaitTablesLine();
/**
* Fetch the next script word, then if cond is *false*, perform a relative jump.
More information about the Scummvm-git-logs
mailing list