In Director 2 and 3 framerates are preset and referenced as: 0x0 to 0xF.
Some movies set a framerate of 0x10.
D2 and D3 interpret this as a framerate of 15.
Which was measured to be exactly the same as setting a framerate of 15.
In D4 it's shown as a framerate of 120.
Movies with a framerate of 0x10:
D2: DATA/WARLOCKSHIP/REUNION (spaceship warlock)
D4: ping.dir (chop suey)
D2 and D3 have 16 distinct framerates, 0x0 to 0xF.
Framerates are integer values. They are rounded down towards their
nearest integer.
The following table is included for completeness.
The information was gathered by creating a D3 movie with an `on stepMovie` handler that counts every frame.
The setting is the setting on the slider in the D3 panel.
It was timed with clicking 'play' in D3 and start on a stopwatch at the
same time. The same for stopping the movie and the stopwatch.
FPS was calculated by dividing the amount of frames given by Director
and the time on the stopwatch.
setting time frames fps
3 60.18 226 3.755
4 30.04 121 4.028
4.1 30.09 131 4.354
4.2 30.29 141 4.65
5 30.38 153 5.036
5.1 30.09 165 5.483
6 30.20 182 6.026
6.1 30.06 201 6.687
7 30.04 228 7.590
8 30.24 260 8.598
10 30.15 302 10.017
12 30.16 364 12.069
15 30.17 454 15.048
20 30.10 602 20.0
30 30.05 904 30.08
60 30.07 1811 60.226
Multiple casts can have the same name. The last encountered cast with
that name was save in a hashtable.
Director seems to use the cast that was encountered last.
This solves the problem by not writing existing cast names.
It happened in the game Louis Catorze. The name mainMenu was associated
with a TextCast but also a ScriptCast. The chunkexpression 'line 5 of
mainMenu' is not valid for a ScriptCast.
File versions aren't constrained to the values in the enum, they can be
any uint16. The enum just contains major versions, and it doesn't make
much sense to treat it as an independent type.
The previous way I handled the FXmp mappings overcomplicated MacText.
It also resulted in behavior different from the original Director. With
the previous implementation, if a Win movie with Arial text was opened
with the platform set to Mac, the textFont of field 1 would return
Arial, while it would return the mapped font name Helvetica in the
original. This implementation's behavior should match the original.
Font mappings are per-cast, so we can't override the WM's font IDs,
which are universal.
Now a TextCastMember's _fontId uses the per-cast font IDs, and the
Cast's _fontMap gives the corresponding WM font ID.