If there is an Xtra in the Xtras folder and an XObject DLL in the root
path with the same name, the Xtra will have been preloaded and therefore
take precedence.
Fixes initial load scripts for Pothead.
_mainHandle is a pointer to the projector archive, and is set once at
the start of execution. DirectorEngine is a better place for it rather
than the first Window, as other Windows might try and access it.
Fixes crash when changing the cursor in Microphone Fiend.
In D5 and up, you don't have to do "openXlib" for Xtras. Having
them somewhere in the top-level Xtras folder is apparently enough.
Also the files can be in there up to five levels deep.
Fixes initial loading in Ingenious.
It is possible for the size of a movie stored as an entry to be larger
than the start offset of the list.
Fixes loading the resource list in the Windows version of Pop Up
Computer.
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.
We used to close resources when we were closing movies, but with making
Archives owned by Director class, we now have list of all _seen_ resources.
This change implements a proper, ordered list of resources which are
overriding the ones loaded earlier.
Fixes cursors in the7colors which were read from previously loaded Shared Casts.
--start-movie=04CLUB:FloorColidor:IntoFloo
The stream becomes owned by the Archive as soon as openStream()
is called, so freeing the Archive object also frees the stream.
Trying to delete it a second time will blow up.
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().
Initially for a bad file that didn't exist, the ProjectorArchive was throwing up, now however implemented gracefully loading.
Fixed error and termination for `Majestic.bin`, the path it tried to look up was `Majestic` from detection entry.
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.
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.