Spaceship Warlock is optimised for very slow disk reads; quite a lot of
movie changes will be preceded by a music cue and a still image, knowing
that the system will take a couple of seconds to read the next file.
As a compromise, add a fake delay of [file size]*1000/150000 ms to movie
switches. This can be short-circuited by clicking the mouse, so it is
still possible to navigate around quickly.
- Add guardrails to m_forget
- Treat g_director->_currentWindow as a reference-counted copy
- Move MacWindowManager cleanup out of ~Datum into Window::decRefCount
This patch sets the flag background for score (or main director engine)
window, It is useful because it prevents the window from jumping to front
of other windows (ie from `open` command) and thus shadowing it.
Fixes `title of window` from workshop, where clicking outside opened window
used to disappear it beneath the main window.
Also fixes 'totaldistortion-win' sequencer TV, when clicking anywhere except
the TV screen, the window used to disappear.
Make DirectorEngine::_allOpenResFiles the de-facto owner of Archive *
objects, move all of the various loadEXE/loadMac methods off Window and
onto DirectorEngine, and replace inline Archive loading with
openArchive().
This patch uses ProjectorArchive to extract multiple resources embedded into executable files, additionally a new function getRawExe is defined which gets raw exe file name without --start-movie overriding it.
Solves the problem for finding multiple resource files like `ModTB.DXR` in 'mcluhan', uses 'mcluhan.exe' to extract resources and add them to SearchMan.
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.
This is in preparation for allowing for Lingo to get/set the picture
of BitmapCastMember.
In particular, storing a Picture lets us easily replace the existing
image (instead of having to rely on ImageDecoder as source).
Also, having Picture instances that are easy to copy will make lifetime
management easier if pictures are copied into longer-living things such
as globals.
Director 4 and later games for windows use filepaths where '\' is the separator.
Games for mac use ':', which was the default.
Director 3 and earlier games were authored on Mac and thus use the ':'
internally.
This fixes a bug where the filename for c:\fileio.dll was parsed
to \fileio.dll. Due to the default ':' everything after the ':' was
seen as the filename.
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.
In Director, Lingo calls to fetch "the pathName" would provide an absolute
path, including the volume. getCurrentPath() originally provided a
relative path, which meant root level would return "". There is at least
one title that checks "the pathName" isn't blank as part of the content
detection routine. Given that from an internal perspective,
getCurrentPath() is always an absolute path from the game root, we can
add a fake drive letter for Windows at the front.
Fixes loading in DEVO Presents: Adventures of the Smart Patrol.
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`.
When in debug mode enter: lingo on
The prompt will start with lingo) to indicate the repl is active.
To stop enter: lingo off
This will allow developers to interactively inspect the current state of
the program.
Only statements that fit on one line are supported.