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.
The previous arrangement was to copy the bits of Lingo state back and forth from
the Window object to the Lingo instance, and query the window for the
callstack. This refactor consolidates the current Lingo state into a single
struct, owned by the Window object and accessible via a pointer on the
Lingo object.
The datum constructor is overloaded and handles setting the type.
Instead of setting the type by hand we leverage the constructor.
The in this commit are mainly for Datums of type int.
FactoryScripts are now dumped with their 'factory-<name>' in the dumped
filename.
Factory scripts are different in that they are not associated with a cast and have a
scripType that is kNoneScript, i.e. -1.
preLoadEventAbort is a boolean property. When true pressing keys or clicking the
mouse can or stop preloading of cast member. ScummVM doesn't preload, so
implemented as a no-op.
The preloadRam property is used to specify the amount of RAM allocated
for preloading casts. ScummVM assumes there's always anough RAM to run
old games.
Set the right bytecode for the entity kTheType. kTheCursor was
defined for two bytecode operations.
This fixes a long standing bug in Majestic. A rectangle got its cursor
set instead of the type. Obsuring other rectangles which did should have
shown a cursor. Now all interactive objects are indicated by a cursor
change.
updateMovieEnabled is a boolean. It's a flag to signal that the changes
in the movie need to be saved when branching to another movie.
The variable is implemented but without any side effect.
The actorList is a global array property. Birthed scripts can be added
to it. The `stepFrame` method is called on all objects in the array on
every frame. < D4 had an executePerFrameHook for this.
the searchPath is an array that contains paths that need to be searched
when opening a file. It's a property on the same global level in the
same way itemDelimeter is.
The searchPath is set via cb_theassign2. It's used for assigning
properties to the movie itself. `g_lingo` in the case of ScummVM.
The only known case for cb_theassign2 is in the game Louis Catorze
where it's only used for the searchPath.
Note: cb_theassign() does the same thing for script and factories
Since there may be frames left on the call stack after Lingo::execute()
is called now, it isn't safe to share one call stack between several
movies executing in parallel.