The Cinepak decoder had an unweighted euclidean color distance calculation for palette matching. This was moved and rewritten to a color distance method on the palette class.
The RGB planes were flipped and TESTBED image decoder tests revealed this bug. AGS is the only engine that allows for 24bpp PCX image, but an example game is currently unknown.
Left shifting a negative number is undefined (as it may eat the sign
bit).
Instead, multiply by 2 which is the same but properly defined.
Also fix the convertYUVToColor function signature as it takes int8
values.
The cicn cursor loader was introduced recently for the Mac SCUMM v6-7
games. I still haven't played Pegasus Prime, but I have forced it to
load all the nine cursors (ID 128-133, 900-901, and 20000) and it seems
to work fine for all of them. At least after I made a few fixes to the
loader itself.
I did get some crashes with the old code when trying to compare them, so
it's possible that we should backport this to 2.9. But I haven't seen
any bug reports about it, so maybe not...?
This fixes transparency for the slider widget handles in v6-7 games.
Someone may want to adjust the image decoder later, but it will do for
now. Not all icons have useful masks, but some do.
When a dialog window is created now, all palettes from the individual
widgets (icons and pictures) are collected and combined into a single
palette. The widget palettes are remapped to this. The icon decoder is
now a proper image decoder, which makes icons and pictures very similar
to handle.
For Director engine it is marked as optional, since so far onnly
one game is using it.
This could lead to regressions since we were not tracking which
games use Indeo codecs since we added them in 2016 (Indeo 4&5) and
2010 (Indeo 3). So, there could be an AVI video which is now stops
playing and produces a warning. In this case, the 'indeo' component
must be added to the respective engine.
This is actually used for images without Rgn as well. The new code
should be easier to understand, and it handles all of the black and
white images from the Mac versions of Loom, Indy 3, Indy 4, MI1, and
MI2. It's still unfortunate - and perhaps unnecessary - that we had two
different decoders for Rect/Rgn, but I'm not comfortable modifying the
old one. Maybe later.
It contains defines that should be available from scummsys.h.
Also, it contains defines to support ancient and
now unsupported versions of MSVC (2013 and earlier)