This reverts commit 036297b605.
Then it solves the same problem in a way that is more compliant
with how similar code is written in this engine thus avioding
accidentally introduced memory leak.
When fading a palette, Director lets you pick a "frame rate" between 1
and 30. These each correspond to a fixed transition time, with the
higher framerates converging to zero.
In D4 and under the slowest of these frame rates is half a second.
After some user feedback they changed this in D5 to be a range
of times, ranging from a leisurely 16.5 seconds all the way to
instantaneous.
Fixes the intro fade in The Cute machine.
By D5, titles are allowed to play back sounds on an arbitrary channel
and the mixer deals with it. This apparently works to an extent on Mac
for D4 and below, whereas Windows D4 has a hard limit of 4 channels.
As the clear intent is to play something, we should do that for all
versions, unless a counterexample shows up.
Used by Smarty.
Previously, the palette ID namespace was shared between cast ID, builtin
ID and resource fork ID. This was quite messy.
The new approach is to use CastMemberID; builtin palettes are libId -1,
cast palettes use their respective libId, and a null CastMemberID
indicates a blank entry.
In D5 and up, you can have multiple casts in the same movie, along with
external casts. Unlike shared casts these are different namespaces;
each movie maps the casts to a libId, which is then used by
CastMemberID.castLib.
For D4 and below, the default cast libId is now represented by
DEFAULT_CAST_LIB. This should make refactoring easier in future.
Required for e.g. Inscape games, where movie files contain more data
than could (at the time) fit into RAM. Removes a noticable wait when
switching movie files.
This is a holdover from the original code, where the cast members
were loaded as part of the Score. Cast is now per-movie, so all the
resources should be in the one place.
It's possible for games to request files that don't exist in the game
path, e.g. C:\WINDOWS\TX2SAVES. As such, the method needs to always
include the quirk files, regardless of whether the path exists.
Fixes loading save games in Operation: Eco-Nightmare
Jamming an absolute Windows path into a filename is allowed on Linux,
however Windows isn't as forgiving.
It would be nice to preserve the full path of the saved file;
unfortunately the SaveFileManager API doesn't support subdirectories.
For now just keep the old pattern of [gameid]-[filename].txt.
Fixes save games in Operation: Eco-Nightmare