[Scummvm-git-logs] scummvm branch-2-6 -> c331b1057b6600edc04d47d481453b2df9e9d734

bluegr noreply at scummvm.org
Thu Jul 7 20:22:49 UTC 2022


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

Summary:
639ad33639 SCUMM: Fix Captain Dread's head when Guybrush says "It's me again."
2720adb6ff SCUMM: Add a `grail` command to the debugger
3afb9d92d9 SCUMM: MONKEY2: Mark workaround introduced in PR #1343 as enhancement
6659b8b806 SCUMM: Fix the Nazis' uniforms in the corridors of Castle Brunwald (FM-TOWNS)
ff7782f7d5 SCUMM: Make Loom intro fire animation run at constant speed
21f7e11305 SCUMM: Exclude Loom demos from recent fire animation enhancement
7960d651c9 SCUMM: Restore the first frame of Indy's reaction drinking from the Grail
e98429c7d2 SCUMM: Fix missing Dr. Fred line when he receives a new diamond
72f4b07673 SCUMM: Fix missing voice when selling back the hub cap and pirate hat
3f00cb9273 SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says
8445882043 SCUMM: Fix Kerner's text not matching his voice in New York
1626588747 SCUMM: Fix wrong text color when Indy and his father escape from the zeppelin (FM-TOWNS)
c331b1057b SCUMM: Fix verbs not being hidden during the biplane cutscene (FM-TOWNS)


Commit: 639ad336390099dafbbdae8d45771ad77db8ad31
    https://github.com/scummvm/scummvm/commit/639ad336390099dafbbdae8d45771ad77db8ad31
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix Captain Dread's head when Guybrush says "It's me again."

When Guybrush interacts with Dread, Dread should turn and face him if
he's not already looking at him. But the original script forgot to do
this check on Bit[129] if Guybrush already met him, tries giving him
an object and then immediately talks to him.

Since Dread's movement is always done by 32 bytes of opcodes, we can
just skip that if its first drawObject() call was done although
Bit[129] was set.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 265d50c171d..38e83dd5d69 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -951,6 +951,18 @@ void ScummEngine_v5::o5_drawObject() {
 		}
 	}
 
+	// WORKAROUND: Captain Dread's head will glitch if you have already talked to him,
+	// give him an object and then immediately talk to him again ("It's me again.").
+	// This is because the original script forgot to check Bit[129] (= already facing
+	// Guybrush) in that particular case, and so Dread would always try to turn and
+	// face Guybrush even if he's already looking at him.  drawObject() should never
+	// be called if Bit[129] is set in that script, so if it does happen, it means
+	// the check was missing, and so we ignore the next 32 bytes of Dread's reaction.
+	if (_game.id == GID_MONKEY2 && _currentRoom == 22 && vm.slot[_currentScript].number == 201 && obj == 237 && state == 1 && readVar(0x8000 + 129) == 1 && _enableEnhancements) {
+		_scriptPointer += 32;
+		return;
+	}
+
 	idx = getObjectIndex(obj);
 	if (idx == -1)
 		return;


Commit: 2720adb6ff5c3cd7f0c213a8343fb936792c000e
    https://github.com/scummvm/scummvm/commit/2720adb6ff5c3cd7f0c213a8343fb936792c000e
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Add a `grail` command to the debugger

This prints the number of the real Grail object when counting from the
left in the final room with the knight in Indy3.

May be useful since there are many Grails, choosing the wrong one kills
you and makes you restart the 3 trials again, and the hints to find it
require the original manual and taking notes during the game.

Changed paths:
    engines/scumm/debugger.cpp
    engines/scumm/debugger.h


diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 9e62652d2ca..7f41f83e6af 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -82,7 +82,8 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
 
 	if (_vm->_game.id == GID_LOOM)
 		registerCmd("drafts",  WRAP_METHOD(ScummDebugger, Cmd_PrintDraft));
-
+	if (_vm->_game.id == GID_INDY3)
+		registerCmd("grail",  WRAP_METHOD(ScummDebugger, Cmd_PrintGrail));
 	if (_vm->_game.id == GID_MONKEY && _vm->_game.platform == Common::kPlatformSegaCD)
 		registerCmd("passcode",  WRAP_METHOD(ScummDebugger, Cmd_Passcode));
 
@@ -1004,6 +1005,28 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 	return true;
 }
 
+bool ScummDebugger::Cmd_PrintGrail(int argc, const char **argv) {
+	if (_vm->_game.id != GID_INDY3) {
+		debugPrintf("Command only works with Indy3\n");
+		return true;
+	}
+
+	if (_vm->_currentRoom != 86) {
+		debugPrintf("Command only works in room 86\n");
+		return true;
+	}
+
+	const int grailNumber = _vm->_scummVars[253];
+	if (grailNumber < 1 || grailNumber > 10) {
+		debugPrintf("Couldn't find the Grail number\n");
+		return true;
+	}
+
+	debugPrintf("Real Grail is Grail #%d\n", grailNumber);
+
+	return true;
+}
+
 bool ScummDebugger::Cmd_Passcode(int argc, const char **argv) {
 	if (argc > 1) {
 		_vm->_bootParam = atoi(argv[1]);
diff --git a/engines/scumm/debugger.h b/engines/scumm/debugger.h
index f81694f27bc..034575083f7 100644
--- a/engines/scumm/debugger.h
+++ b/engines/scumm/debugger.h
@@ -57,6 +57,7 @@ private:
 	bool Cmd_ImportRes(int argc, const char **argv);
 
 	bool Cmd_PrintDraft(int argc, const char **argv);
+	bool Cmd_PrintGrail(int argc, const char **argv);
 	bool Cmd_Passcode(int argc, const char **argv);
 
 	bool Cmd_Debug(int argc, const char **argv);


Commit: 3afb9d92d9b84fa12d309c5745c5d3254b868def
    https://github.com/scummvm/scummvm/commit/3afb9d92d9b84fa12d309c5745c5d3254b868def
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: MONKEY2: Mark workaround introduced in PR #1343 as enhancement

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 38e83dd5d69..97639838ab0 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -425,7 +425,7 @@ void ScummEngine_v5::o5_actorOps() {
 	// the code below just skips the extra script code.
 	if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformFMTowns &&
 		vm.slot[_currentScript].number == 45 && _currentRoom == 45 &&
-		(_scriptPointer - _scriptOrgPointer == 0xA9)) {
+		(_scriptPointer - _scriptOrgPointer == 0xA9) && _enableEnhancements) {
 		_scriptPointer += 0xCF - 0xA1;
 		writeVar(32811, 0); // clear bit 43
 		return;


Commit: 6659b8b806a6ef19d2db6a5c41209f45403c69e5
    https://github.com/scummvm/scummvm/commit/6659b8b806a6ef19d2db6a5c41209f45403c69e5
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix the Nazis' uniforms in the corridors of Castle Brunwald (FM-TOWNS)

In Indy 3, some palette overrides were sometimes necessary to deal
with the 16-color limitation of EGA. When porting the game to the
FM-TOWNS, the palette overrides for the Nazis guards in the corridors
of Castle Brunwald weren't removed, and so their uniforms would be
gray there, although they were properly colored in green in all the
other rooms, including the zeppelin maze.

The PC VGA version doesn't have this problem, since they did remove
this palette override there.

Changed paths:
    engines/scumm/detection_tables.h
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index e7915947c62..bc6a7a57766 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -174,7 +174,7 @@ static const GameSettings gameVariantsTable[] = {
 	{"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR,             0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"indy3", "VGA",      "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS,                  Common::kPlatformDOS, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"indy3", "Steam",  "steam", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
-	{"indy3", "FM-TOWNS",     0, GID_INDY3, 3, 0, MDT_TOWNS,             GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS)},
+	{"indy3", "FM-TOWNS",     0, GID_INDY3, 3, 0, MDT_TOWNS,             GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO5(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS, GUIO_ENHANCEMENTS)},
 
 	{"loom", "EGA",      "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_ENHANCEMENTS)},
 	{"loom", "No AdLib", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS,                        0, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 97639838ab0..35599d27131 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -504,6 +504,20 @@ void ScummEngine_v5::o5_actorOps() {
 			j = getVarOrDirectByte(PARAM_2);
 			assertRange(0, i, 31, "o5_actorOps: palette slot");
 
+			// WORKAROUND: In the corridors of Castle Brunwald,
+			// there is a 'continuity error' with the Nazi guards
+			// in the FM-TOWNS version. They still have their
+			// palette override from the EGA version, making them
+			// appear in gray there, although their uniforms are
+			// green when you fight them or meet them again in
+			// the zeppelin. The PC VGA version fixed this.
+
+			if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns &&
+				(a->_costume == 23 || a->_costume == 28 || a->_costume == 29) &&
+				(_currentRoom == 20 || _currentRoom == 28 || _currentRoom == 32) && _enableEnhancements) {
+				break;
+			}
+
 			// WORKAROUND: The smoke animation is the same as
 			// what's used for the voodoo lady's cauldron. But
 			// for some reason, the colors changed between the


Commit: ff7782f7d5e4388ccd928c5a3943a9e350ef7c92
    https://github.com/scummvm/scummvm/commit/ff7782f7d5e4388ccd928c5a3943a9e350ef7c92
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Make Loom intro fire animation run at constant speed

The fire animation is sped up along with the rest of the game while the
messenger nymph is flying. Slow it down to make it appear to run at
constant speed throughout the intro. This does not apply to the VGA
talkie version, because there the fire isn't animated.

Changed paths:
    engines/scumm/script.cpp


diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index dcf3af99c90..0b4ec9342cc 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -671,6 +671,19 @@ void ScummEngine::writeVar(uint var, int value) {
 				value = 3;
 		}
 
+		// WORKAROUND: When the Loom messenger nymph flies to wake up
+		// Bobbin, the whole game is sped up. Slow down the fire
+		// animation so that it appears to run at constant speed
+		// throughout the intro. This does not apply to the VGA talkie
+		// version, because there the fire isn't animated.
+
+		else if (_game.id == GID_LOOM && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && _enableEnhancements) {
+			Actor *a = derefActorSafe(4, "writeVar");
+			if (a) {
+				a->setAnimSpeed((value == 0) ? 6 : 0);
+			}
+		}
+
 		_scummVars[var] = value;
 
 		// Unlike the PC version, the Macintosh version of Loom appears


Commit: 21f7e11305da8e157e6e73a4d7c12ad611231734
    https://github.com/scummvm/scummvm/commit/21f7e11305da8e157e6e73a4d7c12ad611231734
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Exclude Loom demos from recent fire animation enhancement

Not only do the demos use a different script number, they don't even
have the bug we're working around!

Changed paths:
    engines/scumm/script.cpp


diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 0b4ec9342cc..631e79c76bf 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -677,7 +677,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// throughout the intro. This does not apply to the VGA talkie
 		// version, because there the fire isn't animated.
 
-		else if (_game.id == GID_LOOM && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && _enableEnhancements) {
+		else if (_game.id == GID_LOOM && !(_game.features & GF_DEMO) && _game.version < 4 && vm.slot[_currentScript].number == 44 && var == VAR_TIMER_NEXT && _enableEnhancements) {
 			Actor *a = derefActorSafe(4, "writeVar");
 			if (a) {
 				a->setAnimSpeed((value == 0) ? 6 : 0);


Commit: 7960d651c96cec7aabbf5f891545b09fe05429dc
    https://github.com/scummvm/scummvm/commit/7960d651c96cec7aabbf5f891545b09fe05429dc
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Restore the first frame of Indy's reaction drinking from the Grail

The original game always hides this first frame behind the second one,
probably so that this cutscene never starts with some previous frame
leftovers (since this animation will repeat as long as you pick up the
wrong Grail).

This is a bit unfortunate, especially since it also makes Indy appear
older if he drinks from the real Grail.  So, restore this first frame
and just reset any previously drawn object when starting this animation.

Changed paths:
    engines/scumm/detection_tables.h
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index bc6a7a57766..d3235aa2c35 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -169,9 +169,9 @@ static const GameSettings gameVariantsTable[] = {
 	{"indyloom", "FM-TOWNS",    0, GID_ZAK, 3, 0, MDT_TOWNS, GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS)},
 	{"indyzak", "FM-TOWNS",    0, GID_ZAK, 3, 0, MDT_TOWNS, GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS)},
 
-	{"indy3", "EGA",      "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"indy3", "EGA",      "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"indy3", "Mac",      "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR,             0, Common::kPlatformMacintosh, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
-	{"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR,             0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR,             0, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"indy3", "VGA",      "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS,                  Common::kPlatformDOS, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"indy3", "Steam",  "steam", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"indy3", "FM-TOWNS",     0, GID_INDY3, 3, 0, MDT_TOWNS,             GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO5(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS, GUIO_ENHANCEMENTS)},
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 35599d27131..b4acdd178d2 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -977,6 +977,21 @@ void ScummEngine_v5::o5_drawObject() {
 		return;
 	}
 
+	// WORKAROUND: In Indy3, the first close-up frame of Indy's reaction after drinking
+	// from the Grail is never shown; it always starts at the second step, with Indy
+	// already appearing a bit older. This is a bit unfortunate, especially if you
+	// picked up the real Grail. This was probably done as a way to unconditionally
+	// reset the animation if it's already been played, but we can just do an
+	// unconditional reset of all previous frames instead, restoring the first one.
+	if (_game.id == GID_INDY3 && _roomResource == 87 && vm.slot[_currentScript].number == 200 && obj == 899 && state == 1 && VAR(VAR_TIMER_NEXT) != 12 && _enableEnhancements) {
+		i = _numLocalObjects - 1;
+		do {
+			if (_objs[i].obj_nr)
+				putState(_objs[i].obj_nr, 0);
+		} while (--i);
+		return;
+	}
+
 	idx = getObjectIndex(obj);
 	if (idx == -1)
 		return;


Commit: e98429c7d2090cca46af938d781c575962492302
    https://github.com/scummvm/scummvm/commit/e98429c7d2090cca46af938d781c575962492302
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix missing Dr. Fred line when he receives a new diamond

When Dr. Fred receives a new diamond, he's supposed to report the status
of Hoagie's and Laverne's units, but these talkActor() lines don't have
any associated wait.waitForMessage(), so they were unseen and unheard in
the game until now.

I couldn't find a way of only targeting the impacted lines, so this is
applied to every line from Dr. Fred in this part of the script.

Changed paths:
    engines/scumm/script_v6.cpp


diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 7abf1608905..86252bec681 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2393,7 +2393,7 @@ void ScummEngine_v6::o6_printEgo() {
 void ScummEngine_v6::o6_talkActor() {
 	int offset = _scriptPointer - _scriptOrgPointer;
 
-	// WORKAROUND for bug #1452: see below for detailed description
+	// WORKAROUND for missing waitForMessage() calls; see below
 	if (_forcedWaitForMessage) {
 		if (VAR(VAR_HAVE_MSG)) {
 			_scriptPointer--;
@@ -2422,6 +2422,20 @@ void ScummEngine_v6::o6_talkActor() {
 	_string[0].loadDefault();
 	actorTalk(_scriptPointer);
 
+	// WORKAROUND: Dr Fred's first reaction line about Hoagie's and Laverne's
+	// units after receiving a new diamond is unused because of missing
+	// wait.waitForMessage() calls. We always simulate this opcode when
+	// triggering Dr Fred's lines in this part of the script, since there is
+	// no stable offset for all the floppy, CD and translated versions, and
+	// no easy way to only target the impacted lines.
+	if (_game.id == GID_TENTACLE && vm.slot[_currentScript].number == 9
+		&& vm.localvar[_currentScript][0] == 216 && _actorToPrintStrFor == 4 && _enableEnhancements) {
+		_forcedWaitForMessage = true;
+		_scriptPointer--;
+
+		return;
+	}
+
 	// WORKAROUND for bug #1452: "DIG: Missing subtitles when talking to Brink"
 	// Original script does not have wait.waitForMessage() after several messages:
 	//


Commit: 72f4b076730320e1b5ce021e3fd0fa4cf4cb91f5
    https://github.com/scummvm/scummvm/commit/72f4b076730320e1b5ce021e3fd0fa4cf4cb91f5
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix missing voice when selling back the hub cap and pirate hat

The Ultimate Talkie edition of Monkey Island 2 has a small script error
when you try to sell back your hub cap or your pirate hat to the antique
dealer.  It wasn't doing a comparison with the proper object number, and
so it would play a fallback line with no voice.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index b4acdd178d2..366180f1ccc 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1404,10 +1404,23 @@ void ScummEngine_v5::o5_isEqual() {
 	// are only played on type 5 soundcards. However, there is at least one
 	// other sound effect (the bartender spitting) which is only played on
 	// type 3 soundcards.
-
 	if (_game.id == GID_MONKEY2 && var == VAR_SOUNDCARD && b == 5)
 		b = a;
 
+	// WORKAROUND: The Ultimate Talkie edition of Monkey Island 2 doesn't
+	// check the proper objects when you sell back the hub cap and the
+	// pirate hat to the antique dealer on Booty Island, making Guybrush
+	// silent when he asks about these two particular objects.
+	//
+	// Not using `_enableEnhancements`, since this small oversight only
+	// exists in this fan-made edition which was made for enhancements.
+	if (_game.id == GID_MONKEY2 && _roomResource == 48 && vm.slot[_currentScript].number == 215 && a == vm.localvar[_currentScript][0] && strcmp(_game.variant, "SE Talkie") == 0) {
+		if (a == 550 && b == 530)
+			b = 550;
+		else if (a == 549 && b == 529)
+			b = 549;
+	}
+
 	// HACK: To allow demo script of Maniac Mansion V2
 	// The camera x position is only 100, instead of 180, after game title name scrolls.
 	if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO) && isScriptRunning(173) && b == 180)


Commit: 3f00cb92736a87a82ab2e22d61e9d84563a62312
    https://github.com/scummvm/scummvm/commit/3f00cb92736a87a82ab2e22d61e9d84563a62312
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says

According to the manual, you can execute commands by clicking on the
sentence line. But this doesn't work with the v1 or v2 DOS versions,
even though it works with the C64 demo. This is because the verb script
doesn't for this, so we have to do that ourselves. This is loosely based
on how Zak McKracken does it.

Changed paths:
    engines/scumm/detection_tables.h
    engines/scumm/script_v2.cpp


diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index d3235aa2c35..07fb758171a 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -156,10 +156,10 @@ static const GameSettings gameVariantsTable[] = {
 	{"maniac", "Apple II",   0, GID_MANIAC, 0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"maniac", "C64",        0, GID_MANIAC, 0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI) },
 	{"maniac", "C64 Demo",   0, GID_MANIAC, 0, 0, MDT_C64, GF_DEMO, Common::kPlatformC64, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI) },
-	{"maniac", "V1",      "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"maniac", "V1",      "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformDOS, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"maniac", "NES",        0, GID_MANIAC, 1, 0, MDT_NONE,  0, Common::kPlatformNES, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ENHANCEMENTS)},
-	{"maniac", "V2",      "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ 	{"maniac", "V2",      "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
 	{"maniac", "V2 Demo", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 
 	{"zak", "V1",       "v1", GID_ZAK, 1, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index efe0ffcc79b..ba5d347578e 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -451,6 +451,25 @@ void ScummEngine_v2::writeVar(uint var, int value) {
 			value = 27;
 	}
 
+	// WORKAROUND: According to the Maniac Mansion manual, you should be
+	// able to execute your command by clicking on the sentence line. But
+	// this does not work until later games. The main difference between
+	// the verb scripts (script 4) in Maniac Mansion and Zak McKracken is
+	// that Zak will set variable 34 when you click on the sentence line
+	// (as indicated by VAR_CLICK_AREA), and Maniac Mansion will not.
+	//
+	// When VAR_CLICK_AREA is 5, there is only one place where variable 34
+	// is initialized to 0, so that seems like a good place to inject our
+	// own check.
+
+	if (_game.id == GID_MANIAC && (_game.version == 1 || _game.version == 2)
+			&& _game.platform != Common::kPlatformNES
+			&& vm.slot[_currentScript].number == 4
+			&& VAR(VAR_CLICK_AREA) == kSentenceClickArea
+			&& var == 34 && value == 0 && _enableEnhancements) {
+		value = 1;
+	}
+
 	_scummVars[var] = value;
 }
 


Commit: 8445882043b913d9009c715a577e986ccddab2c5
    https://github.com/scummvm/scummvm/commit/8445882043b913d9009c715a577e986ccddab2c5
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix Kerner's text not matching his voice in New York

The Talkie version of Indy4 changed Kerner's line when he uses the phone
booth in New York (reusing some words from the research lab scene), but
the text doesn't match with the voice in most releases: he says Ubermann
but the text mentions Fritz, in the English version.

The 1994 Talkie Macintosh release fixed this line, so we can replicate
this later, official fix as an enhancement for all the English talkie
releases.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 366180f1ccc..d2a8b6130c2 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1323,13 +1323,13 @@ void ScummEngine_v5::o5_isScriptRunning() {
 	getResultPos();
 	setResult(isScriptRunning(getVarOrDirectByte(PARAM_1)));
 
-    // WORKAROUND bug #346 (also occurs in original): Object stopped with active cutscene
-    // In script 204 room 25 (Cannibal Village) a crash can occur when you are
-    // expected to give something to the cannibals, but instead look at certain
-    // items like the compass or kidnap note. Those inventory items contain little
-    // cutscenes and are abrubtly stopped by the endcutscene in script 204 at 0x0060.
-    // This patch changes the the result of isScriptRunning(164) to also wait for
-    // any inventory scripts that are in a cutscene state, preventing the crash.
+	// WORKAROUND bug #346 (also occurs in original): Object stopped with active cutscene
+	// In script 204 room 25 (Cannibal Village) a crash can occur when you are
+	// expected to give something to the cannibals, but instead look at certain
+	// items like the compass or kidnap note. Those inventory items contain little
+	// cutscenes and are abrubtly stopped by the endcutscene in script 204 at 0x0060.
+	// This patch changes the the result of isScriptRunning(164) to also wait for
+	// any inventory scripts that are in a cutscene state, preventing the crash.
 	if (_game.id == GID_MONKEY && vm.slot[_currentScript].number == 204 && _currentRoom == 25) {
 		ScriptSlot *ss = vm.slot;
 		for (int i = 0; i < NUM_SCRIPT_SLOT; i++, ss++) {
@@ -3170,6 +3170,24 @@ void ScummEngine_v5::decodeParseString() {
 					else
 						strcpy((char *)tmpBuf+16, "^19^");
 					printString(textSlot, tmpBuf);
+				} else if (_game.id == GID_INDY4 && _language == Common::EN_ANY && _roomResource == 10 &&
+						vm.slot[_currentScript].number == 209 && _actorToPrintStrFor == 4 && len == 81 &&
+						strcmp(_game.variant, "Floppy") != 0 && _enableEnhancements) {
+					// WORKAROUND: The English Talkie version of Indy4 changed Kerner's
+					// lines when he uses the phone booth in New York, but the text doesn't
+					// match the voice and it mentions the wrong person, in most releases.
+					// The fixed string is taken from the 1994 Macintosh release.
+					const char origText[] = "Fritz^ Fantastic\x10news!\xFF\x03I think we've found the treasure we\x10seek.";
+					const char newText[] = "Dr. Ubermann^ Fantastic\x10news!\xFF\x03We've found the treasure we\x10seek.";
+					if (strcmp((const char *)_scriptPointer + 16, origText) == 0) {
+						byte *tmpBuf = new byte[sizeof(newText) + 16];
+						memcpy(tmpBuf, _scriptPointer, 16);
+						memcpy(tmpBuf + 16, newText, sizeof(newText));
+						printString(textSlot, tmpBuf);
+						delete[] tmpBuf;
+					} else {
+						printString(textSlot, _scriptPointer);
+					}
 				} else if (_game.id == GID_MONKEY_EGA && _roomResource == 30 && vm.slot[_currentScript].number == 411 &&
 							strstr((const char *)_scriptPointer, "NCREDIT-NOTE-AMOUNT")) {
 					// WORKAROUND for bug #4886 (MI1EGA German: Credit text incorrect)


Commit: 1626588747cc1a35fc2d8b1bf769f259f1f23bc4
    https://github.com/scummvm/scummvm/commit/1626588747cc1a35fc2d8b1bf769f259f1f23bc4
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix wrong text color when Indy and his father escape from the zeppelin (FM-TOWNS)

Most lines in this cutscene miss their color parameter, which makes
both actors speak with the same color, which is confusing since one of
them suddenly appeared, and you can barely see them.

(For some reason, the PC VGA version also misses the color parameters,
but it works there, maybe because there's some palette-shifting going
on, which has been mostly removed in the FM-TOWNS version?).

We can fix this by always giving an explicit color to Indy's and his
father's lines. But the lines are not attached to any actor, and it's
hard to determine who's who, especially if we want to support
translations too. Henry Sr. is the only one using a wait() instruction
in his sentence, and he's the only one saying "Junior", so we try to
detect that.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index d2a8b6130c2..b030b5d7358 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -3160,6 +3160,20 @@ void ScummEngine_v5::decodeParseString() {
 					// speech line is missing its color parameter.
 					_string[textSlot].color = 0x0A;
 					printString(textSlot, _scriptPointer);
+				} else if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _roomResource == 80 &&
+						vm.slot[_currentScript].number == 201 && _enableEnhancements) {
+					// WORKAROUND: When Indy and his father escape the zeppelin
+					// with the biplane in the FM-TOWNS version, they share the
+					// same text color. Indeed, they're not given any explicit
+					// color, but for some reason this is only a problem on the
+					// FM-TOWNS. In order to determine who's who, we look for a
+					// `\xFF\x03` wait instruction or the `Junior` word, since
+					// only Henry Sr. uses them in this script.
+					if (strstr((const char *)_scriptPointer, "\xFF\x03") || strstr((const char *)_scriptPointer, "Junior"))
+						_string[textSlot].color = 0x0A;
+					else
+						_string[textSlot].color = 0x0E;
+					printString(textSlot, _scriptPointer);
 				} else if (_game.id == GID_INDY4 && _roomResource == 23 && vm.slot[_currentScript].number == 167 &&
 						len == 24 && 0==memcmp(_scriptPointer+16, "pregod", 6)) {
 					// WORKAROUND for bug #2961.


Commit: c331b1057b6600edc04d47d481453b2df9e9d734
    https://github.com/scummvm/scummvm/commit/c331b1057b6600edc04d47d481453b2df9e9d734
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-07-07T23:22:41+03:00

Commit Message:
SCUMM: Fix verbs not being hidden during the biplane cutscene (FM-TOWNS)

Room 80 only contains a cutscene, where Indy and his father escape
from the zeppelin with the biplane. But it is started with
`cutscene()` instead of `cutscene([1])` which also disables the verb
interface.

The FM-TOWNS version doesn't like this and some verb leftovers were
mixed with the graphics. Adding the missing `[1]` parameter should fix
the issue.

Confirmed to also happen with the original interpreter under UNZ.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index b030b5d7358..9d4110dc618 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -845,6 +845,15 @@ void ScummEngine_v5::o5_cursorCommand() {
 void ScummEngine_v5::o5_cutscene() {
 	int args[NUM_SCRIPT_LOCAL];
 	getWordVararg(args);
+
+	// WORKAROUND: In Indy 3, the cutscene where Indy and his father escape
+	// from the zeppelin with the biplane is missing the `[1]` parameter
+	// which disables the verb interface. For some reason, this only causes
+	// a problem on the FM-TOWNS version, though... also happens under UNZ.
+	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns && _currentRoom == 80 && vm.slot[_currentScript].number == 201 && args[0] == 0 && _enableEnhancements) {
+		args[0] = 1;
+	}
+
 	beginCutscene(args);
 }
 




More information about the Scummvm-git-logs mailing list