XObjects are cloned by LC::call, which apparently has a magic copy
constructor. This means that any raw pointers inside the XObject will get
thrown into the cloned object, upsetting the fragile kayfabe of ownership
which underpins memory safety in C++.
Fixes the first movie switch in Classical Cats.
This is based on the documentation that says to name ripped audio tracks
starting at 1 rather than their actual track index. I've seen this in
other engines that use CD audio tracks as well.
The only examples of this being used are for looking up movies.
findMoviePath will handle a file extension mismatch, which happens in
a D5 game that specifies a .DIR filename when the file on disc is .DXR.
Macromedia provided the full source code of FileIO as an example for
XLib developers, so it stands to reason that people would make their
own build with extra functions.
Fixes the initial movie switch in Maniac Sports.
When Director initializes the file browser, it can specify a default
filename as well. Some games use this to make suggestions about save
game names. For example, Ganbare! Inuchan 2 will use the default
save name of `INU.DAT`. ScummVM was silently ignoring the value
before this.
Previously, paths were verified by pathMakeRelative().
This method had several drawbacks; the code was increasingly ad-hoc
and recursive, and the function would return a Common::String that
was not guaranteed to be distinct. 90% of the time the path would need
to be converted to Common::Path so that file streams could use it.
This code has been replaced with findPath(), a function which takes a
path string as recieved from Director (e.g. a Lingo script, a filename
stored in a CastInfo record) and returns a Common::Path object for the
file on the local system. The inner workings have been split into subfunctions,
which should make it easier to add workarounds and fuzz at the correct
layer.
Adding one to the prefix's length meant the first character of the
filename would be omitted.
Fixes Ganbare Inuchan 2 creating savegames with the first letter the
player typed missing.
This is loaded as `MovieUtilities` in Momi no Ki no Shita de, which
also makes use of the getSystemPath method.
Other methods not implemented since they're not used on this disc.
Smartmenu implementation using offsetY to displace popup such that the previous selected item will fall onto cursor, includes checked item and highlighted.
For `Popup Menu` in theapartment, without this patch the second popmenu was not remembering the last selected item and was opening it from scratch, after this patch popupmenu will open from the last selected item already selected with checkbox.
Implements xlib methods for popupmenu creation/item selection, uses macpopmenu internally.
Used for implementing 'Popup Menu' in theapartment, with this popupmenu are working.
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