This fixes Fukuoka-Go-Round, which ends up passing the main EXE as a movie
to (re)open at runtime instead of a movie. Without this, clicking back to
the main menu crashes the disc.
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.
Handle loadStream returning false when the pic doesn't confirm.
In this case a 'DIB ' with a headersize not matching 40.
Observed happening in:
- Fujitsu fm TOWNS Super TECHNOLOGY DEMO
- KUZIRA.MMM from PINGU
Remove check if resource exists in the stream when loading a cast.
This check is already executed by `Archive::getMovieResourceIfPresent`.
Coverity found this as a Deference null return value due to not
checking if the stream was not a nullptr.
Fixes COVERITY: 1491676
The Lingo tests were failing because of memory leaks.
- `move` overwrote an existing cast without deleting it
- `puppetTransition` was set but not removed on class destruction
- the *.lingo test files were opened but never removed
Lingo function `closeResFile` is only responsible for closing resource
file opened by `openResFile`. Register in `openResFile` which files
where opened and close only those files in `closeResFile`.
- Rename `_openResFiles` to `_allOpenResFiles` and
- Add new `_openResFiles` hashmap to track which files were opened in
`openResFile`.
Create a variable on ScriptContext to track if it's only in
lctxContexts to ease deletion.
Factories and scripts with script id < 0 are tracked and deleted on
~LingoArchive. The hashmaps lctxContexts and scriptContexts overlap in
the values. The forementioned factories and scripts with script id < 0
were only in lctxContext.
scriptContexts was already cleaned up in ~LingoArchive.
registering the archive
Resource forks were closed when switching to a different movie.
Those resource forks need to stay available.
In this case for cursors for Star Trek: The Next Generation Interactive Technical Manual
This reverts commit 1b6e2335b3.
Check if the the key requested from loadedStxts is available before
getting the value.
Star Trek Omnipedia requests stxt id 5, which isn't loaded.
Resolves: https://bugs.scummvm.org/ticket/13341
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.
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.
Not all cast types are handled when the cast is a child.
For example lingo scripts. This commit will notify us where other
unhandled cast childres exist.
The framerate byte is now understood. A framerate byte of 0 means a
framerate of 3. Which is handled during framerate parsing.
The check for 0 is therefor redundant.