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:
4248e22cbf (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.
Most of the workarounds in SCUMM explain a bit what's going on, even
when referring to a Trac issue, but this one didn't say much.
I tested that this problem still occurs today (boot param 5234 is
perfect for this), while the original interpreter within DREAMM
doesn't mind this script.
This bug was already fixed in the Ultimate Talkie edition, but a good
part of this script has been rewritten in this version, so I'd rather
avoid triggering any _scriptPointer change there. The Bit[129] check
was probably enough to prevent this, but I'd rather be safe.
Adding the check is also a way of documenting that this version fixed
this.
The original gets its delay - about 10 seconds, judging by the emulator
I tried - by loading resources. ScummVM does that in the blink of an
eye. Of course, we don't want the full delay. Just a tasteful one.
When playing as Sophia in some scenes (such as in the Azores), using the
`Look at` verb on Indy would make her speak with Indy's voice, because
the script triggering this sentence for this verb didn't check or
include a line for the case when VAR_EGO is Sophia.
Fortunately, a different script does have this exact same line dubbed
for Sophia, so we can reuse it, as long as the audio offsets have the
values that we expect (and I'm only aware of a single MONSTER.SOU file
for this title, always in English and identical on all ports).
("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.