[Scummvm-git-logs] scummvm master -> 6eb94422cf5cd365833fc62c07b29f6a5c1d06c0

bluegr noreply at scummvm.org
Sat Mar 8 20:38:22 UTC 2025


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:
6eb94422cf SCUMM: LOOM: Add an enhancement fixing Hetchel flying with two heads in some releases


Commit: 6eb94422cf5cd365833fc62c07b29f6a5c1d06c0
    https://github.com/scummvm/scummvm/commit/6eb94422cf5cd365833fc62c07b29f6a5c1d06c0
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-03-08T22:38:18+02:00

Commit Message:
SCUMM: LOOM: Add an enhancement fixing Hetchel flying with two heads in some releases

Some EGA releases of Loom have a bug where Hetchel may appear with two
heads for a few frames, when she's talking as she's flying, when she
appears at the forge to help Bobbin.

I can reproduce this problem in the original English EGA 1.0, EGA 1.1 and
Macintosh releases. It's been fixed by LucasArts in the French EGA 1.2
and in the Hebrew EGA releases (possibly others).

The TG16/PC-Engine release, and all later 256-color releases, appear to
be fixed by default.

So, for the earliest EGA releases, bring the script changes that LEC
made back then, i.e. some new `TalkAnimNr` options to some of the
`ActorOps()` calls of scripts 34-88 and 38-87.

Script 34-88:
 (11) animateCostume(11,245);
 (80) breakHere();
 (80) breakHere();
-(13) ActorOps(11,[WalkAnimNr(6),StandAnimNr(6)]);
+(13) ActorOps(11,[WalkAnimNr(6),StandAnimNr(6),TalkAnimNr(6,6)]);
...
-(13) ActorOps(11,[WalkAnimNr(2),StandAnimNr(3)]);
+(13) ActorOps(11,[WalkAnimNr(2),StandAnimNr(3),TalkAnimNr(4,5)]);
 (11) animateCostume(11,3);
 (AE) WaitForCamera();
 (80) breakHere();
...
 (11) animateCostume(11,245);
 (80) breakHere();
 (80) breakHere();
-(13) ActorOps(11,[WalkAnimNr(6),StandAnimNr(6)]);
+(13) ActorOps(11,[WalkAnimNr(6),StandAnimNr(6),TalkAnimNr(6,6)]);
 (11) animateCostume(11,9);

Script 38-87:
 (01) putActor(12,288,60);
 (1E) walkActorTo(12,96,60);
 (AE) WaitForActor(12);
-(13) ActorOps(12,[WalkSpeed(8,4),InitAnimNr(6),WalkAnimNr(6),StandAnimNr(6)]);
+(13) ActorOps(12,[WalkSpeed(8,4),InitAnimNr(6),WalkAnimNr(6),StandAnimNr(6),TalkAnimNr(6,6)]);
 (1E) walkActorTo(12,48,60);
...

I guess more official EGA 1.0 > 1.1 > 1.2 script fixes could be backported
as enhancements...

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 1932c53489e..a15aed8ce82 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -633,6 +633,8 @@ void ScummEngine_v5::o5_actorOps() {
 			error("o5_actorOps: default case %d", _opcode & 0x1F);
 		}
 	}
+
+	workaroundLoomHetchelDoubleHead(a, act);
 }
 
 void ScummEngine_v5::o5_setClass() {
@@ -3563,6 +3565,10 @@ void ScummEngine_v5::decodeParseStringTextString(int textSlot) {
 	}
 }
 
+#pragma mark -
+#pragma mark --- Enhancements & workarounds ---
+#pragma mark -
+
 void ScummEngine_v5::printPatchedMI1CannibalString(int textSlot, const byte *ptr) {
 	const char *msg = (const char *)ptr;
 
@@ -3591,4 +3597,33 @@ void ScummEngine_v5::printPatchedMI1CannibalString(int textSlot, const byte *ptr
 	printString(textSlot, (const byte *)msg);
 }
 
+void ScummEngine_v5::workaroundLoomHetchelDoubleHead(Actor *a, int act) {
+	// WORKAROUND: In Loom, when Hetchel appears at the forge to help Bobbin, she
+	// may have two heads for some frames, when she's talking as she's flying.
+	//
+	// The problem is known to exist in (at least) the EGA 1.0, 1.1 and Macintosh
+	// releases. The fix is taken from the official French EGA 1.2 release; the
+	// TG16 and all later 256-color releases appear to be fixed by default as well.
+	if (_game.id == GID_LOOM && _game.version == 3 && !(_game.features & GF_OLD256) && _currentScript != 0xFF &&
+		(act == 11 || act == 12) && enhancementEnabled(kEnhMinorBugFixes)) {
+		// Hetchel looks at and then flies to the forge; TalkAnimNr() options were
+		// added to some ActorOps() calls in EGA 1.2 script 34-88.
+		if (vm.slot[_currentScript].number == 88 && _roomResource == 34) {
+			if (a->_walkFrame == 6 && a->_standFrame == 6) {
+				a->_talkStartFrame = a->_talkStopFrame = 6;
+			} else if (a->_walkFrame == 2 && a->_standFrame == 3 && act == 11) {
+				a->_talkStartFrame = 4;
+				a->_talkStopFrame = 5;
+			}
+		}
+
+		// Hetchel goes into the forge chimney to get Bobbin's distaff;
+		// TalkAnimNr(6,6) option was added to ActorOps(12) in script 38-087.
+		if (vm.slot[_currentScript].number == 87 && _roomResource >= 38 && _roomResource <= 40) {
+			if (a->_walkFrame == 6 && a->_standFrame == 6 && act == 12)
+				a->_talkStartFrame = a->_talkStopFrame = 6;
+		}
+	}
+}
+
 } // End of namespace Scumm
diff --git a/engines/scumm/scumm_v5.h b/engines/scumm/scumm_v5.h
index 0b90d7e2b8c..aa7c240f1b1 100644
--- a/engines/scumm/scumm_v5.h
+++ b/engines/scumm/scumm_v5.h
@@ -92,6 +92,8 @@ protected:
 
 	void injectMISESpeech();
 
+	void workaroundLoomHetchelDoubleHead(Actor *a, int act);
+
 	/**
 	 * Fetch the next script word, then if cond is *false*, perform a relative jump.
 	 * So this corresponds to a "jne" jump instruction.




More information about the Scummvm-git-logs mailing list