Currently, buffers get allocated that do not get freed. Apparently,
the reason is that it is not well known when it is actually safe to
do that. This here should hopefully fix the situation. Or at least
give some inspiration on how to fix it...
("INDY3 (FMTowns): Map lines are drawn incorrectly, plus more
issues when leaving Germany")
The bug with the wrong colors is caused by the shadow palette, which
gets set with the colors for the modified country borders, but gets
reset immediately after drawing the background. So when the map
travel marker makes an area dirty, it would be restored with the wrong
color. Now, the original V3 FM-Towns interpreter can draw on layer 2
directly, without declaring anything dirty, effectively bypassing the
normal SCUMM drawing. This avoids any change to the background.
This happens for drawBox, but also when displaying or hiding the pause
banner.
In SCUMM5 drawBox works the way we had it implemented, drawing
on the text surface (MI1: also on the vs buffer) and then making that
rect dirty.
(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.
Perhaps this will finally fix the screen corruption bug I've been seeing
occasionally in Mac Indy 3? That seemed to happen because the screen was
changing while the game was paused, after the Window manager had made a
copy of the current screen.
Verified on disasms ranging from HE70 to HE100.
The original EXEs never checks for transparency
when drawing a BMAP image.
As a matter of fact it doesn't even use drawStripHE,
but it uses a simplified version which doesn't have
the check at all.
We disable the transparency check accordingly and
use the compression type code just to produce the
correct bits-per-pixel and mask decompression params.
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 French VGA floppy release of Monkey Island 1 (and, apparently,
this release alone), the easter egg making fun of Sierra games has a
dark blue background that makes the black text really hard to read (very
much like the MI1 v5 issue in front of the Governor's mansion, which we
already fix). The problem is in the OI itself, which was redrawn to
feature a translated text.
This problem doesn't exist in the other French releases (including the
Amiga VGA one), and the non-French VGA floppy releases look fine, to me.
So, just force a white background instead of dark blue, for this object
and on this particular release only.
(Note: they also messed up the top and left borders of that object, and
so a small black horizontal line will suddenly appear when the "Guybrush
falling into the trees" animation starts. Unfortunately, this is a
horizontal line, while strips are drawn as a series of vertical lines,
so it's hard to only fix this line, especially since its black color is
reused in the same strip for Guybrush trousers... So, this enhancement
just concentrates on solving the main issue, which is the legibility
problem with the blue background.)
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.