We don't need the resource fork as we unpack Stuffit anyway which is
fully in data fork. So we want to allow to play even if data fork was lost
Previously we had 2 entris to achive the same result for CD entry: one
covering resource hash and another one covering data fork hash.
They are created silently by various versions of OSX and may contain
garbage describing plain macbinary rather than historically dumped data from
disk.
Previously, this would return the palette for the current frame (if it
was specified). Real Director behaviour is to return the current
palette in use, i.e. taking into account changes made in previous
frames.
When reading the palette ID from a BitmapCastMember, 0 or below
signifies a builtin palette and should be offset by -1. 1 or above
signifies a palette Cast ID.
Also make sure to compare like for like: a cast member ID needs to be
sent through resolvePaletteId to get the index in the actual palette
store.
Fixes palette swapping in the Lost Mind of Dr. Brain demo.
The resource fork in the Director 4 projector has a 16-color palette
right next to the 256-color System - Mac one, and the colors seem to
match the default System 4 palette. Nevertheless, this palette appears
to be reasonably different (both in colors and ordering) from the one
actually used. Included is a palette determined empirically from
DOSBox screenshots.
Surface::ditherFloyd() supports having different palette counts;
as it is a private function wrapped by convertTo(), adjust the
short-circuit check in convertTo() so that the short circuit
happens if both palettes are equal in size and content.
All of the builtin palette lookup tables have been reversed, to match
the original layout of the tables in the Director 4 projector executable.
This corresponds with the colour indexing used in Lingo.
Likewise, the code to load palettes from the cast no longer reads the
colours in reverse order, and shiftPalette no longer expects
the start index to be after the end index.
DirectorEngine::transformColor still exists to upgrade to 32-bit colour,
but no longer reverses the palette index.
The missing builtin 16-color palettes from Director 4 have been added.
This appears to be another space reclamation feature in Director;
there are examples of the property list being a -1 followed by
bytecode garbage from the previous field.
Previously, there was a workaround which would set score->_nextFrame to
the current frame. This meant that setting the stageColor in an
exitFrame handler would loop that single frame and softlock the movie.
The new approach re-renders the sprites and window inline, as we do
in several other spots.
Fixes frame progressions in Yaken Rodem.