("Inaccurate verb rendering in Monkey 1 FM-TOWNS)"
Actually, this is rather an emulation of an original bug than a fix...
I have also included a fix in the charset renderer that I noticed, but I don't think that one actually matters anywhere.
I haven't added a fix for exisiting saves. It would require another version bump and it is really not important enough.
Checked against my EGA/DOS French copy: script 33 appears to have the
same Local[5] error as in the VGA release. It also looks like Local[1]
and Local[3] are uninitialized in the EGA version too, but this doesn't
seem to cause any issue.
Actually, if I completely disable this workaround, I can't reproduce the
original crash anymore, so maybe we handle uninitialized local values
the same way the original interpreter did, now?
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.
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!
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.
Also include room palette fixes for games that were saved with a different video mode. Unfortunately the scripts make changes to the room palette based on VAR_VIDEOMODE. The original interpreter does not fix that.
(original interpreter bug, reported by antoniou79)
The original interpreter has an actor palette fix for the CGA mode, but it isn't properly re-applied after the script makes changes to the actor palette)
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.
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.
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.
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.
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.
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.
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.
When ripping the audio tracks from CD, you may not get quite what the
game expects, e.g. my copy of Loom has less silence at the start of the
track than the CDDA.SOU file from the Steam version. And the MI1 intro
appears to be timed with the assumption that there is no silence at all
at the start of that track.
This makes it possible to compensate for that without having to edit the
audio file. It may also be of some help with fan soundtrack replacements
for MI1, though I have little experience with that.
In the NES version of Maniac Mansion, each kid has their own CD player
playing a different background music by default.
Each CD player script does something like this when you turn it off:
(2F) if (!getState04(46)) {
(D8) printEgo("It's already off.");
(18) } else {
(67) clearState04(46);
(1A) Var[224] = 0; # <==
(3C) stopSound(71);
(**) }
but Wendy's CD player script is missing the `Var[224] = 0` line, so
although her music was stopped, the game scripts weren't properly aware
of this, and so her music could suddenly resume, such as when entering
and leaving room 3 with her character.
In most (if not all) versions of Loom before the Talkie v4 release, one
of the shepherds should trigger a "We are the masters of stealth" line
if Bobbin tries to use the stealth draft on them, but no proper value for
the actor number is ever given. In the original interpreters, the invalid
line would be skipped. The Talkie release changes the lines a bit and
makes the third shepherd (act. 4) say something similar, instead.
Until now, ScummVM would work around this by forcing the leftmost (act. 2)
shepherd to say this line. But, looking at the original script, it seems
that the original intent may have been to let any of the four shepherds
say this line, since script 232 expects a parameter which could be given
by any of the associated 422--425 (act. 2--5) actor objects.
So, moving this check from actorTalk() to o5_startScript() lets us
implement a more comprehensive workaround (with a bit more safety checks,
since there are so many Loom versions), but it also exposes another bug
in some EGA versions and derivatives (e.g. the French EGA version has it,
but the English EGA 1.1 version doesn't): if Bobbin uses the stealth draft
on the second shepherd (act. 3), then some line(s) will be completely
missing, potentially because this actor has been removed from the scene
in the earliest versions, although he's still in use.
Having zero reaction from the shepherds when you try their draft upon
them can be extremely confusing, so we need to work around this, too.
Forcing this actor to "stay" doesn't fix the issue for now (and the
symptoms are a bit different between ScummVM and the original
interpreters), so at the moment we force this workaround even if
`_enableEnhancements` is not enabled, when we detect this strange
actor behavior.
When switching back to Zak after using the blue crystal on the bird in
Lima, the bird disappears, comes back, and disappears again. This is a
very strange visual behavior that only happens in the FM-TOWNS version.
(This has been confirmed, back in 2006, to be an original bug that also
occurs under the Unz emulator.)
This V3 port added an unconditional putActor(6,136,0) call at the start
of the 201 script which controls this, negating the getActorX() and
getActorY() checks which happen a few lines later. Ignoring this
putActor() call appears to restore the original V2 behavior, i.e. the
bird flies back to the pedestal.
Some versions of Loom will always show the close-up of sleeping Rusty
where he's wearing his own clothes. Later versions (e.g. FM Towns and
VGA) will show different close-ups depending on if you've used the
Reflection draft on him. So this adds that check to the older versions
as well.
The original fixed versions will look at a variable to determine if
you've used the Reflection draft on Rusty. Unfortunately, it's not the
same variable across all versions - there are even different EGA
versions with different variables! - so instead we check if the Bobbin
actor has a different costume. That seems to work across all versions so
far.
I didn't create this workaround, but I think it makes sense to make it
(ensuring that the window is broken and the coat is there even if you
skip the intro) optional.
The object that the click registers on doesn't has an empty object
script, so it won't move you back into the caves. Redirect to the
appropriate object's script instead. I've verified with the built-in
debug mode that the original seems to have the same problem.
In the EGA version, and others I've tried, the problematic object is
later in the object list, so the cave object takes precedence.
There was no WaitForMessage() after "Oooh, that's nice." when you give
the wimpy idol to the cannibals, so we simulate one. The other missing
lines, that were mysteriously dropped from the VGA CD version, were
probably never recorded so we make no attempt to reinstate them for this
version.
Unfortunately that means I had to add the enhancements checkbox to the
EGA Loom settings widget, because I can't see any way to automatically
combine the static and dynamic settings widget. Oh well.
Don't let the "send Rusty's ghost to guard the rift" script start as
long as the "make Rusty's ghost appear" script is running, because once
he reaches the rift he will then instantly teleport back to his body.
This bug happens in the original as well, though at least in ScummVM it
behaves a little bit differently in the FM Towns version than in any of
the other I tried. The fix still works for all of them, though.
The VGA talkie version is not affected, because there Rusty's ghost
appears in the rift, and the dialog makes sense regardless of whether
Bobbin or Rusty speaks first.
This was a script bug in the EGA DOS, Amiga and Atari ST versions, where
the open door object was left clickable after the door closed. Later
versions fixed it in two different ways: Either by making sure it wasn't
clickable, or by checking that the door really was open in the object
script.
We use the first fix, even though it becomes a bit inconsistent when the
object is later made unclickable. The second fix is only used by the FM
Towns and TurboGrafx-16 versions, as far as I can tell.
You're both still outside, so it doesn't make sense for the background
sound to suddenly stop. I guess the makers of the Special Edition agree,
because there the sound doesn't stop either.
* SCUMM: Fix Invalid phrase with GIVE crashes Monkey Island EGA Demo
* SCUMM: Suggested changes on Pull #3731
* SCUMM: specify game id in Pull #3731
* SCUMM: seperated AMIGA monkey VGA and VGA Demo variants. Assigned GF_DEMO flags
The first and second animation when Mandible uses the distaff were so
close that they looked like one, and it looked like the second one was
missing. This patch adjusts the timing of the second one.
The more I looked at it, the less I liked my old solution. Intercepting
getVar() meant that jumpRelative() would still be called, which made it
sensitive to what getVar() returned when the workaround was active. And
I have no idea how it didn't mess up _scriptPointer somewhere along the
way. So now it's in o5_equalZero() instead, where it can completely
replace the original instruction with o5_breakHere().
When examining the dragon's pile of gold a second time, the "Wow!"
message was not visible. This appears to be a scripting bug particular
to this version (it works in the EGA version), and we work around it by
simulating a WaitForMessage() instruction after the message is printed.
I noticed that the "I am Choas" typo in VGA Loom was no longer patched,
and I'm guessing the other workarounds may have been broken too. This
was a regression from when the missing Lemonhead lines in Monkey Island
1 were reinstated.
Now Bobbin's palette is changed when entering/leaving the darkened tent.
It's odd that this effect looks so different from all other versions of
the game that I've tried (VGA, EGA and FM Towns), but it seems to match
the original behavior based on YouTube videos I've watched.
The credits script asks for white shadowed text, but the original (at
least when running in Basilisk II) uses light gray shadowed text. I have
no idea why, and the only workaround I can think of is to force the text
color this way.
It's possible for scripts to remap colors, of course, but that's not
what seems to be going on here.
I don't have this version of the game myself, so it's based on a YouTube
playthrough and walking through the process of extracting the necessary
data with timofonic. It has not been properly tested, though the
messages do look correct if I insert them into the English version.
WORKAROUND bug #12420 (also occurs in original) Broken window and coat missing
This happens when you skip the cutscenes in the beginning, in particular
the one where Indy enters the office for the first time. If object 23 (National
Archeology) is in possession of Indy (owner == 1) then it's safe the force the
coat (object 24) and broken window (object 25) into the room to compensate for
the skipped code.
Also occurs in original.
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 cutscene in script 204 at 0x0060.
This workaround changes the result of isScriptRunning(164) to also wait for
any inventory scripts that are in a cutscene state, preventing the crash.
Script #204
[0000] (1A) Bit[354] = 1;
[0005] (1A) Var[249] = 0;
[000A] (5D) setClass(303,[32]);
[0011] (DD) setClass(VAR_EGO,[5]);
[0018] (2E) delay(1200);
[001C] (80) breakHere();
[001D] (68) VAR_RESULT = isScriptRunning(164);
[0021] (A8) if (VAR_RESULT) {
[0026] (18) goto 001C;
[0029] (**) }
[0029] (58) endOverride();
[002B] (91) animateCostume(VAR_EGO,3);
[002F] (5D) setClass(303,[160]);
[0036] (40) cutscene([]);
[0038] (AE) WaitForMessage();
[003A] (14) print(5,[Text("Obviously you have nothing for us.")]);
[0060] (C0) endCutscene();
[0061] (2A) startScript(105,[],F);
[0064] (A0) stopObjectCode();
END