CastMovie cast data is now parsed. A first step to implement
CastMovies.
CastMovies are references to other director movies and
can be played inside the current movie. Star Trek an interactive
manual makes use of them.
The flags raw data was:
100110 no flags
101110 sound
000110 loop
100100 crop
100101 crop and center
110110 enable scripts
011011 everything
Multiple functions looped over the whole to cast to filter out specific
cast member types and load data.
The looping is contained to loadCastMemberData. Loading for each
cast type is refactored to have a function per type.
In all v5 releases (except for the SegaCD one), the priest's lines will
switch between 3 colors in a row, when Guybrush meets LeChuck in the
church of Mêlée Island. The original EGA and VGA floppy releases don't
have this weird behavior.
This forces the same color for all his lines (while making sure not to
match Elaine's offscreen line), choosing the gloomy green color from the
Ultimate Talkie edition, since the original EGA/VGA releases also used
that.
For looping sounds, the original code polled the score and created a new
AudioStream every time the previous iteration finished playing. The
downside of this approach is the sound needs to be fully resampled and
buffered after each playback, which can be heard as a gap between loops.
To fix this, loops now use a LoopableAudioStream. The reason why the
previous code did not was to allow for a specific edge case.
In Director, when a looping audio channel is set to cast member 0, the
loop is allowed to finish the current iteration before the audio stops.
Originally there wasn't a way of doing that, but now the
LoopableAudioStream classes can stop playing after a number of
iterations. As such, we keep a copy of the LoopableAudioStream handle
and call for the loop to stop when the cast member gets set to 0.
Improves looped audio playback in Eastern Mind.
Fixes the guitar solo between the transition from BLAST.DXR to INTRO.DXR
in Meet MediaBand.
Fixes the audio transition between n.am and s.am in Meet MediaBand.
The default sprite type for an empty channel in Director is kInactiveSprite;
make sure this is used as some scripts depend on it.
Fixes being unable to summon the drum in Eastern Mind.
I don't know what scenario was used as a basis for developing the existing
applyColor logic in inkDrawPixel(). As such, I've kept it for the uint32
pathway, and replaced the uint8 pathway with the logic documented in the
Director 4 manual.
Internally, ScummVM refers to palette indices in a reverse order
compared to the Director runtime. As such, any script-based reading or
writing of color indices needs to be transformed to match this.
Fixes the coloring of the inventory in Eastern Mind.
In Director 4, with score scripts it is possible for the compiler
to produce a generic handler which is empty, in addition to named
handlers (e.g. mouseUp). The original behaviour for sprite scripts
was to default to the generic handler if it exists, even if there
is a named handler that matches the event. This change makes the
generic handler the fallback choice.
Fixes opening the inventory in Eastern Mind.
Cast::loadCastChildren() iterates over all casts, not just the ones that
have children. The original commit gave a buildbot error for all casts
that weren't handled by loadCastChildren.
This reverts commit ec5e0cf1b6.
This replaces every single strcpy call in the engine with
Common::strlcpy.
Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
This avoids the filter text to take the focus.
In Android this prevents the launcher to start with the virtual keyboard
displayed.
In the future, the widget could also take keyboards event into account
like the ListWidget one.
It looks like my French floppy VGA release doesn't have that fix,
although the English floppy VGA release from the LRG Anthology has it!
So it just feels safer to enable this workaround for all Monkey 1
releases (except for the Ultimate Talkie Edition). If the same fix is
already in this script, it shouldn't hurt.
In Part 2, the Jolly Roger should only be visible in the first cutscene
showing the Sea Monkey in the middle of the sea. For the next two
cutscenes showing the full ship, it shouldn't be there anymore, since
Guybrush must have picked it for these scenes to happen.
The VGA releases fixed this small oversight from the original game, but
then this fix appears to have been lost for the v5 releases.