Commit Graph
266 Commits
Author SHA1 Message Date
AndywinXp 9f319cdd86 SCUMM: Add Mac screen implementation for remaining LEC games
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.
2024-10-28 08:24:59 +01:00
AndywinXp 67b0440ad0 SCUMM: MI1 (Mac): Implement EPX scaling and a stub for the menu 2024-10-28 08:24:59 +01:00
Hubert Maier 370064f93f JANITORIAL: SCUMM: Fix typos 2024-09-16 01:55:26 +03:00
Donovan Watteau 30b46ce49e SCUMM: MONKEY1: Fix the "Important Notice" sign workaround for the Macintosh release
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 :)
2024-09-07 02:03:03 +02:00
Donovan Watteau 88d0978a86 SCUMM: Mention that Monkey1-Amiga already has the fix for the map at Meathook's
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.
2024-09-03 01:44:35 +02:00
Donovan Watteau 89404547d0 SCUMM: Add a new WORKAROUND for buggy map usage at Meathook's
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!
2024-09-01 12:45:32 +02:00
Donovan Watteau f039be35d9 SCUMM: Document Trac#346 workaround a bit more
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...).
2024-08-31 13:07:58 +02:00
Donovan Watteau d74b20aefe SCUMM: Make Trac#5709 enhancements optional
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.
2024-08-31 11:52:17 +02:00
Donovan Watteau 724ab1a3d0 SCUMM: Document the original interpreter behavior for Trac#346 and Trac#10571
Test done by AndywinXp, grazie mille!
2024-08-30 23:13:16 +02:00
Donovan Watteau c7c4eafa49 SCUMM: Add TODO comments for some Enhancements / original interpreter behaviors to explore 2024-08-29 22:12:10 +02:00
Donovan Watteau 7cb47c31f8 SCUMM: Add/update some enhancementEnabled() calls for some workarounds
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...
2024-08-29 22:12:10 +02:00
Donovan Watteau edc3d61cc2 SCUMM: JANITORIAL: Rename _enableEnhancements to enhancementEnabled in comments 2024-08-02 21:35:53 +02:00
athrxx 84a0bff281 SCUMM: fix Coverity warnings 2024-05-20 15:32:19 +02:00
athrxx 158614fce6 SCUMM: some Coverity fixes 2024-05-07 19:26:06 +02:00
athrxx b868dab4c5 SCUMM: (V3/FM-Towns) - partial fix for bug no. 15027
(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.
2024-04-30 23:29:53 +02:00
AndywinXp 14d1540e4b SCUMM: Fix #15018
Thanks eriktorbjorn for the nudge in the right direction ;-)
Confirmed by the disasm.
2024-03-23 10:45:38 +01:00
athrxx 0baa6b593a SCUMM: coverity fixes 2024-01-30 00:35:45 +01:00
Torbjörn Andersson 6991ba08a1 SCUMM: Add workaround for MI2 glitch when diving to the Mad Monkey
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.
2024-01-20 23:36:15 +01:00
Torbjörn Andersson ffa7e807d5 SCUMM: Properly flag MI1 Smirk close-up enhancement
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.
2023-12-31 15:30:26 +01:00
AndywinXp bd22763cdc SCUMM: MACGUI: Implement correct video size for Mac v3 games
This commit brings games to 640x480 (from 640x400).
All old savegames are compatible and are brought up to date in
real time.
2023-12-03 21:03:59 +01:00
AndywinXp 8ddd8da773 SCUMM: GUI: Fix confirmation on exit behavior on script quit commands
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.
2023-11-13 22:33:18 +01:00
AndywinXp 8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled 2023-11-08 11:46:06 +01:00
AndywinXp e7f4f25881 SCUMM: Clean-up and explain enhancement classes 2023-11-08 11:46:06 +01:00
AndywinXp d5fa7aeb90 SCUMM: Mark all enhancements with their respective classes 2023-11-08 11:46:06 +01:00
Torbjörn Andersson 127c585362 SCUMM: More work on Indy 3 Mac GUI
It's now possible to travel all the way to Venice, though there is a
glitch on the travel map there.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 702ec52d96 SCUMM: Lots of Indy 3 Mac GUI rewriting 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 716cd6e0e5 SCUMM: Remove Indy 3 Mac GUI mock-up. Begin work on proper GUI.
The goal is to make the interface as simple as possible, and to put as
much of the knowledge of what's going on into MacIndy3Gui itself.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 33b6ee6c05 SCUMM: Remove verb position adjustments for Indy 3 Mac 2023-10-16 17:40:29 +02:00
Torbjörn Andersson e74f6d5a59 SCUMM: Disable some Mac-specific Indy 3 stuff
Just as an experiment.
2023-10-16 17:40:29 +02:00
AndywinXp f4455e773e SCUMM: Relabel part of the general sound code
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.
2023-08-18 22:20:45 +02:00
AndywinXp eba3e39d9b SCUMM: Fix RNG debug message for v5 and below games 2023-04-05 13:21:21 +02:00
AndywinXp ae02bf6ab8 SCUMM: Make chosen random numbers visible via debug level 6 2023-04-02 18:24:28 +02:00
AndywinXp 2a91e8ef70 SCUMM: LOOM (Towns): Fix save slot boxes being smaller than they look on the original 2022-11-28 23:21:45 +01:00
AndywinXp 9102a2f0ec SCUMM: DIG: Fix palette artifacts on cursor change
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.
2022-11-28 21:28:32 +01:00
Torbjörn Andersson 32a6f94cfe SCUMM: Fix comment typo 2022-11-28 07:16:08 +01:00
Torbjörn Andersson 41984b7153 SCUMM: Use new GF_ULTIMATE_TALKIE flag instead of strcmp()
This workaround was added after I submitted the recently merged pull
request, so it didn't get included in those changes.
2022-11-08 06:48:19 +01:00
Torbjörn Andersson 1ffa644d20 SCUMM: Add feature flag for the "Ultimate Talkie" version of MI1/MI2
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.
2022-11-07 22:07:28 +02:00
Donovan Watteau e80a33eb74 SCUMM: Prevent Indy from being stuck in Crete (WORKAROUND)
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...
2022-11-01 00:17:19 +02:00
AndywinXp ade8ebd097 SCUMM: INDY4: Replace old actor workaround with proper fix 2022-10-17 21:24:41 +02:00
Donovan Watteau ea0f0cc9ee SCUMM: Remove old getDist() MI2 workaround for Trac#420
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.
2022-10-17 17:28:57 +02:00
Donovan Watteau 4ff9960ac9 SCUMM: Remove old getDist() MI1 workaround for Trac#1194
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.
2022-10-17 16:56:59 +02:00
AndywinXp 6572d3c3df SCUMM: Remove an unneeded 20 years old LOOM CD workaround
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.
2022-10-17 16:01:10 +02:00
AndywinXp 3bd3fe6b04 SCUMM: INDY4: Properly fix #1265 2022-10-17 00:49:38 +02:00
Donovan Watteau 14f12c3d6c SCUMM: Fix the storekeeper closing the door in MI1CD (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.
2022-10-12 22:53:31 +03:00
Donovan Watteau 468575ed06 SCUMM: Only apply Trac#2215 subtitle workaround when Indy uses the gold box
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.
2022-10-12 13:03:36 +02:00
Torbjörn Andersson 15572c408b SCUMM: Exclude SEGA CD and FM Towns versions from dog sign workaround
The SEGA CD version already uses the old colors, and the FM Towns
version makes the text more readable by giving it a black outline.
2022-10-09 11:23:19 +03:00
Torbjörn Andersson b01d7d4d57 SCUMM: Exclude "Ultimate Talkie" MI1 from dog sign color workaround
The unofficial talkie version already uses the floppy version colors.
Applying our fix to it, while it doesn't seem to do any harm, is
unnecessary.
2022-10-09 11:23:19 +03:00
Torbjörn Andersson effb129776 SCUMM: Make the dog sign colors in MI1 VGA CD closer to MI1 VGA floppy
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.
2022-10-09 11:23:19 +03:00
Donovan Watteau f7bdce7671 SCUMM: Adjust subtitle color workarounds for MI1 FM-TOWNS
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.
2022-10-07 13:34:59 +02:00
AndywinXp 59c0b4fa7d SCUMM: Extend workaround for #832 to all games using this code 2022-09-30 21:16:36 +02:00