Just before Guybrush sinks to the ocean floor, he is drawn at the wrong
position for a split second. This happens in the original too, though I
found it much easier to spot in ScummVM for some reason. We work around
this by setting Guybrush's elevation at the same time as he's put into
the room.
The part where the colors are remapped to get them right for Smirk's
cigar smoke was always run. Now it's only run when the enhancement is
enabled. This makes no visible difference, since those colors are only
used by the cigar smoke, and when the enhancement isn't enabled the
cigar smoke isn't drawn. But it's still the right thing to do.
We now quit without confirmation when the scripts tell the
interpreter to quit. Except in COMI main menu, when pressing
on the "Quit" option. In that case we must ALWAYS show the
confirmation dialog box.
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
and ours, when rewriting the sound code.
Interestingly, but unsurprisingly, this was caused by 20 years old code which now produces no effects
at all, other than causing the bug that this commit fixes :-P I have checked the disasm of every version
of SCUMM, and there is no sign of updatePalette() ever being called at the end of the fadeOut() function.
Removing it fixes the issue. I have tested every game I have for this change, but I'm sure that whatever
that updatePalette() call was trying to fix 20 years ago, it has probably been fixed properly now, so there's
no need for it.
Also, removed _fullRedraw toggles in o_LoadRoom for DIG and COMI, which, judging by the disasm, don't
force the redraw after changing the scene.
There are so many workarounds where we either want to make sure it's not
the "Ultimate Talkie" version or that it is, that it's much nicer to
have a feature flag than having to strcmp() the variant.
In the "elevator" room in Crete (where you can pick up the gold box),
one can get stuck in the room, if quickly clicking on the right side of
the room, although that part shouldn't be accessible yet at that point.
This is because the original entry script for this room initializes
the walkbox matrix too late, so it's possible to move to the other side
of the room before the walkbox restrictions kick in. This workaround
just copies the original setBoxFlags() and createBoxMatrix() calls, but
triggers them at an earlier stage.
This enhancement is always enforced, since you can get completely stuck,
and some players can be totally confused by this problem.
Also happens with the original interpreter; I remember hitting this
issue twenty years ago...
This one was added more than 20 years ago, but I can't reproduce the
issue anymore with the DOS, Macintosh, or Amiga versions, and it
appears that it was already OK back in 2008.
I couldn't reproduce any lock-up with the original DOS version in
DOSBox either.
We are probably closer to the behavior of the original interpreters
now, because I can't reproduce this ScummVM problem anymore with any
demo, Passport to Adventure, EGA or Amiga version.
Bisecting a bit with the Amiga demo, this has effectively been fixed
by commit d719e83783.
20 years ago this was needed because it was assumed that actor 0 was an invalid actor, but that
simply isn't true. In the original this particular call failed because actor 0 wasn't in the current room,
and this is exactly what happens now on our end, when removing this workaround.
In the v5 releases of Monkey Island 1, the storekeeper on Mêlée Island
closes the door *after* going to the counter, which looks very strange
since he's far away from it, at this point. In the v4 releases, he just
closes it *before* walking away from it, which is much more natural.
AFAIK the storekeeper isn't meant to have the same Jedi powers as the
troll on the bridge, so that's probably yet another scripting oversight
from the SCUMM v4 to v5 update.
Fix this by calling the related script a bit earlier. This was already
fixed in the SegaCD release and in the Ultimate Talkie edition.
This subtitle bug only happens if Indy has the gold box and is about to
use it, right after finding the beads in Crete. Document this, and don't
apply the workaround if we're not in this case, since this pauses Indy's
animation for no reason.
See the difference in behavior with the two old savegames included
in Trac#2215 issue.
Also make this an enhancement, while there.
Tested with the Floppy/French, DOS/Talkie/English and
Macintosh/Talkie/English releases. Original issue also in DREAMM.
The colors in the sign that tells you that the dogs are only sleeping
are much harder to read in the VGA CD version than in the VGA floppy
version. I assume these were not picked deliberately, but rather a
consequence of the palette being different. So this works around that by
temporarily remapping the palette for the sign object, and adjusting one
of the text colors to something close to the floppy version.
In the FM-TOWNS version of Monkey Island 1, the inventory is limited to
16 colors, and it looks like the subtitles have a similar constraint, so
adjust the subtitle color workarounds for the priest and the head of the
navigator for this case, otherwise they would just be printed in white.
When the navigator head speaks, the v5 release forgot to adjust the
`Color(6)` parameter for the v5 palette changes, meaning that the text
wasn't displayed with the intended brown color, as in all other versions
(this was fixed in the v5 SegaCD release, though).
In the versions of Monkey Island 1 with the full 256-color inventory,
going at Stan's (when he's not there) will mess up the color of some
objects, such as the "striking yellow color" of the flower from the
forest suddenly being greenish in this room. The VGA floppy release
doesn't appear to have this issue, so this is probably another oversight
from the v5 release.
The setPalColor() calls are taken from the Ultimate Talkie Edition.
This fix is not applied to the FM-TOWNS and Sega CD releases, since they
use a smaller palette (and I don't have them).
The original FM-TOWNS interpreter had a bug which made the verb font
much thinner than in the other releases (it was missing its "3D"
effect).
Some people may prefer seeing the original behavior, others prefer
having original game bugs fixed, so `_enableEnhancements` solves the
personal taste matter.
Was discussed here:
https://github.com/scummvm/scummvm/commit/4248e22cbfc54c36dcc17f4d3912a5fb30a5dbc2#commitcomment-80191288
ScummEngine::actorTalk() doesn't crash anymore when the actor number
is 0. ScummVM behaves like the original nowadays, in that the invalid
line is just silently skipped, and so restoring the missing line is
just simpler than I thought during my previous change.
We still have to deal with actor 3 which is in a buggy status in some
releases, but again it was possible to deal with this in a simpler way
(especially since my usage of `return;` was wrong, here).
The earliest 16-color releases of Loom have a bug when Bobbin exits
room 32 (in the dragon's cave) with the staircase on the right: he will
walk *through* them instead of just walking *on* them, if he entered the
room via the other stairs in the ground.
This has been fixed in some 1.2 and later releases, but the original
16-color English releases appear to always have this bug (even with the
original interpreters). The 1.2 release fixed this with more changes
(incl. checking Bobbin's coordinates), but this smaller fix appears to
be enough.
With some help from eientei on Discord, who also found that the
scripts were different in this room between the EGA releases.
Fixing original typos is usually an enhancement now, and most of the
SCUMM workarounds describe what's going on.
Still OK with the English talkie release from GOG (with boot param 4964).
I'm not sure this workaround works with the floppy releases though (the
length and offsets look talkie-only) but I don't have any English floppy
release of this title.
In all v5 releases (except for the SegaCD one), the priest's lines will
switch between 3 colors in a row, when Guybrush meets LeChuck in the
church of Mêlée Island. The original EGA and VGA floppy releases don't
have this weird behavior.
This forces the same color for all his lines (while making sure not to
match Elaine's offscreen line), choosing the gloomy green color from the
Ultimate Talkie edition, since the original EGA/VGA releases also used
that.
This replaces every single strcpy call in the engine with
Common::strlcpy.
Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
It looks like my French floppy VGA release doesn't have that fix,
although the English floppy VGA release from the LRG Anthology has it!
So it just feels safer to enable this workaround for all Monkey 1
releases (except for the Ultimate Talkie Edition). If the same fix is
already in this script, it shouldn't hurt.
In Part 2, the Jolly Roger should only be visible in the first cutscene
showing the Sea Monkey in the middle of the sea. For the next two
cutscenes showing the full ship, it shouldn't be there anymore, since
Guybrush must have picked it for these scenes to happen.
The VGA releases fixed this small oversight from the original game, but
then this fix appears to have been lost for the v5 releases.
The crowd has some reaction lines while Guybrush plays the spitting
contest on Booty Island, but some of them are missing an audio sample
in the current version of the Monkey Island 2 Ultimate Talkie builder.
Neither the script nor the MONSTER.SOU file appear to have it,
although the voiced clips are there in the original 000001e1,
00000661, 00000caf, 000001e8, 0000066c and 00000cba.wav files.
The crowd would then remain silent for these particular lines.
Let's just drop them if we detect them without any associated audio
resource, since the crowd has already a lot of other reaction lines
which play fine. This is written with as much care as possible for any
future update or fan-made translation which would change this.
If you've muted the speech or if you're playing in keep-original-text
mode we can keep them as-is, though.
If one closes the door just before using the pins with the voodoo doll
in front of Largo, the middle of the door will glitch when Largo opens
it again to escape from his room.
It looks like script 13-200 forgot to clean the part of the door which
deals with the (invisible) laundry claim ticket, in this case. But
script 13-213 triggers the same action without any problem, since this
one properly updates the class and state of this object; so let's just
reuse its `setState(111,2)` and `setClass(111,[160])` calls.