SCUMM: LOOM: Fix Hetchel flying with two heads in some EGA releases (Enhancement)#6470
Conversation
|
Tests on the Atari or Amiga releases (English or other languages) could be useful, for example. I know they sometimes have their room or scripts reordered, and so I'd like to make sure it's working there as well. Thanks! |
dbad3c2 to
69abd97
Compare
|
@dwatteau nice! Would it be possible to move the workaround code in a separate function, so that it's cleanly separated from the normal code? |
Sure. I agree that the workarounds add noise to the main functions. But I wonder if we shouldn't move to a cleaner approach at some point, such as what the SCI engine does for patches, or a pseudo- Anyway, having dedicated functions for workarounds is a first step. @bluegr: Do you want a single function for each workaround, on its own? Or should such workaround functions contain various similar workarounds? |
I've tested with the English TurboGrafx-16 and Japanese FM Towns versions and the glitch, unsurprisingly, doesn't happen there either.
Sounds like a good idea to me. It never occurred to me to check the other versions that I own. |
For now, let's start moving big chunks of code into separate functions, I.e. each workaround with a lot of business logic should be put into its own function, so that the workaround code will not disrupt reading the main engine logic |
69abd97 to
baa6e7f
Compare
Sure. Are you OK with the new PR update update, then? (Though, I wonder how this approach is going to "scale"? For example, in those This debate is not the subject of this PR, though. But I guess at some point we'll reach the point where we'll want to have a cleaner implementation for SCUMM enhancements. Maybe they should mostly be written in a way where they don't interrupt the main engine logic at all, thanks to a better hot-patching, or dynamic resource patching mechanism. We call the Enhancements "workarounds" in the engine, because they're a bit dirty, I guess. A more elegant solution could probably be found (hence my thoughts about what SCI does), but I personally don't have the proficiency to submit such a solution :/ Anyway, as always, I digress… but I guess at some point this topic will come back. |
…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...
baa6e7f to
5a3f9a8
Compare
|
Looks good now, thanks! Yeah, we'll have to find a cleaner long-term solution for such workarounds/patches, cause the SCUMM engine is full of them :( Anyway, awaiting for the github action builds to finish, and merging |
|
Thanks, merging |
Summary
Some time ago, @eriktorbjorn mentioned on Discord that some EGA releases of Loom have that bug where Hetchel flies with two heads, for a few frames at the forge:
I can reproduce this problem in (at least):
It's been fixed by LEC in (at least) the following EGA releases, though:
And then I tested the PC-Engine Japanese release, the FM-TOWNS English release, and the talkie CD release, and there the problem never appears.
Enhancement implementation
Erik suggested this short diff:
With a few tweaks (that I can add here if necessary), I'd be OK with it, but since LEC had an official fix for it back then, it's maybe better to just copy their changes?
Here are the script changes between the EGA 1.1 and 1.2 releases, when Hetchel's speaking at the forge:
Script 34-88:
Script 38-87:
So, my PR tries to detect these
ActorOpscalls, and add theTalkAnimNr()options that LEC added above.It works just fine with the EGA 1.0/1.1/Macintosh releases mentioned above. It doesn't cause any regression with the 1.2 French/Hebrew releases already having these script changes.
Screenshots
For reference, here's what the earliest EGA releases of Loom would display, in that case.
How to test this PR
drafts learn,drafts(note the "Sleep" and "Reflection" lines),room 34Expected behavior: