Any conversation in the game is likely to set one or more bit variables
that are intended for other things. Luckily none of them appear to be
game breaking, but still... We detect and correct the faulty pattern,
but old savegames will still be impacted.
I've tested the latest enhancement on my English Amiga '1.2' release;
that's a GID_MONKEY_VGA release, but in this one, script 39-211 is
intact, i.e. the smoke hasn't been removed from this VGA release.
So:
- Adjust the workaround a bit, to avoid any potential problem if run
on an Amiga release where the smoke may already be there (still, I'm
not excluding Common::kPlatformAmiga from this enhancement, as maybe
some Amiga releases exist with such an empty script?)
- Replicate this Amiga script, instead of the DOS CD one. I'm doing
this because the Amiga release is v4, while the DOS CD release is
v5. Since this enhancement targets v4 VGA releases, it feels safer
to do so, following its more typical `setClass(12,[150,149])` v4
calls (which map to kObjectClassIgnoreBoxes/kObjectClassAlwaysClip).
The enhancement from commit d06c6006f6
changed o5_notEqualZero() so that the variable number being read by
getVar() could be examined, which is required in this context.
But doing so made notEqualZero use the getVar() call from V3 and
later in V1-V2 games as well, breaking Maniac Mansion or Zak with
fatal errors such as "ERROR: (45:4:0x1F7): variable (reading) 10269
is out of bounds (0,799)".
This hopefully fixes notEqualZero, by only applying this getVar()
"local override" when running Monkey1 (which is always v4 or v5).
In most versions of MI1 (at the very least the DOS CD, Macintosh, and
Sega CD ones, but also the EGA and Amiga ones according to YouTube
playthroughs) there is animated smoke in some places in the lava maze
beneath the monkey head. But in my VGA floppy version, the script that
places the smoke is empty. It's still called though, so this workaround
does what the script does manually.
Instead of hard-coding the colors, look for the closest one to the one
we want. Apparently this is needed for the FM Towns version, and only
that one. I don't have it, but I'm told it works better now. I've
verified that the versions I do own (VGA CD, Mac, Sega CD, Special
Edition) still work.
The first time Guybrush enters the ship's hold, there is a message where
he remarks that the whole thing reeks of monkeys. But the way it's
scripted, it's only shown if it has already been shown. We can enable
the message by inverting the check.
It turns out that there are at least two cases where the Sega CD version
draws conversation options outside of the screen. I wouldn't be
surprised if there are more.
This would happen when telling the Men of Low Moral Fiber about the
governor being kidnapped. Where the script was supposed to add 8 pixels
to the Y coordinate, it instead added 8 rows, forcing the text to be
completely outside the screen.
I have verified that this is an original bug by watching the scene in a
YouTube playthrough of the game.
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...
What is now missing is the delay time between phrases.
Some of the code will be refactored, since this was
hacked in for mantaining compatibility with stuff outside
of MI1:SE.
- Injected the audio code in the correct place (displayDialog), from
disasm provided by @AndyWinXP (thanks!)
- Added support for multiple speech files for the same message
- Added game flag to MI1SE, for using remastered audio
TODOs:
- Correctly calculate the local script offset for all scripts
e.g. object scripts, such as Elaine's poster in the second screen)
- Handle multiple speech files for the same message
- Add handling for speech delay
It's possible that it was cut for performance reasons (it's also removed
from the Amiga version), since there's some simple parallax scrolling
going on here. But that's not a concern for ScummVM, of course.
This adds optional EPX scaling and 640x480 resolution for
LucasArts Macintosh games other than Indy3 and Loom.
This includes:
* Monkey Island 1
* Monkey Island 2
* Indy4
* Day of the Tentacle
* Sam&Max
* Full Throttle
* The Dig
In doing this, I reverted the ugly code which previously offset
the game screen 20 pixels below (to create an internal 320x240
buffer, instead of 320x200). Instead of just offsetting mouse
coordinates and the final screen texture, I used to offset the
in-engine graphics elements. Ew.
This ensures flawless savegame compatibility between old and
new, without touching anything.
For some reason, the background color of the sign at the Governor's mansion
is already white in the Macintosh release (at least in the one I have here),
but the scripts still have the wrong color set. It looks like the Macintosh
interpreter may have fixed this on the fly...
So we still have to fix this, but for the Macintosh release the Enhancement
will always be enabled, since it matches the original behavior. Also, this
release only changed the background color, not the text color.
See my addition to the previous GH-4168 PR for a screenshot.
If someone has a Macintosh interpreter showing a different behavior, or
wants to analyze it to see whether the fix is indeed hardcoded into it,
I'd be curious to know that, of course :)
Now, the workaround is written in a way as not to cause any problem if
the fix is already included in a release, and since several Amiga
releases may exist, it makes no sense to exclude this port from this
check.
In the SCUMMv4 releases of Monkey1 (with the older inventory), if one
tries to use/look at the map in Meathook's house or on Hook Isle
Shore, strange animation behaviors will happen, and a fatal script
error can also happen if one looks at the map instead of using one of
the verbs on the parrot.
This was fixed in the SCUMMv5 releases (an incomplete fix was also
added in the VGA SCUMMv4 releases), by making Guybrush say "I don't
need to look at a map right now." instead (as was already done for
some other rooms where this script causes too many issues). So we
just bring this fix to the earlier releases as well.
Reported by Mugg1991 in an amazing tcrf.net investgation, thanks!
One needs to wait a bit before reading the note or the map, for the
script sync issue to show up, and also the bug is also there in the
SCUMMv4 releases, but there it seems to only cause some strange
animation behavior, instead of an error (to be fixed with a new
enhancement at a later date...).
Reading the scripts and the (nicely detailed) original bug report,
it looks all good for being a `kEnhMinorBugFixes` enhancement.
The Macintosh and 256-color releases appear to be not affected, but
the workaround is done in a way where this doesn't matter.
I reviewed what I was comfortable with; this change is not complete
(and I didn't review the HE workarounds at all), but it's still an
improvement.
I may need to update the Enhancement page on the wiki with these
changes...
(INDY3 (FMTowns): Map lines are drawn incorrectly)
This fix addresses the part concerning the line width of the travel
marker. Turns out that SCUMM3 FM-Towns draws all boxes one
pixel wider and higher on virtual screens other than 1. This also
allows removal of a hack in ScummEngine_v5::o5_drawBox().
I also fixed the old style pause/restart banners, since they incorrectly
used drawBox() for line drawing (which would be glitchy with the now
verdrawing drawBox(). The positive outcome is that we no have original
looking FM-Towns banners (only in Japanese, though, since - unlike the
original - we don't run the English version in 640x480).
The changed method of drawing and removing the banner also fixes
the removal of the black country borders on the map. But it will still
be removed below the pause banner and in the spots where the travel
marker passes the border. So that has to be addressed separately.
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.