That will make sure that Windows disk references will be cleaned up.
Used in mcluhan-win startup where it calls getNthFileNameInFolder("C:\prefs\Notes", 1)
The color values went inverted, but in several places they left
untouched.
In general, it is not a good idea to have this hardcoded, but at least
now we have this addressed.
The lexer originally had a rule mandating that "go" was followed by a
space, with an optional "to" afterwards. The rule has been changed so
that "go" can be immediately followed by a string.
Fixes the script compilation error on the second screen of Wrath of the
Gods.
In D3, when "go to" is invoked in a Score script, the context is frozen
and "on stepMovie" is called, then the frozen context is finished, then
the next frame's Score script gets called with an "enterFrame" event.
In D4, you're allowed to freeze and recurse "enterFrame" scripts to a
depth of 2; any deeper and "enterFrame" events will no longer be thrown.
Fixes Lingo freeze recursion loop in Wrath of the Gods.
Score::update() has several branches that quit early, e.g. if the frame
is waiting for a click or a sound. All of these should try to unfreeze
any contexts that are waiting.
Fixes opening the inventory screen in Hell Cab.
Director 4 has a cast member field to set a palette for a bitmap. If
this field differs from the current movie palette, Director will try and
do nearest-neighbour colour remapping of the bitmap to the movie palette.
Director 3 and below have a cast member field to set a palette for a
bitmap, but it doesn't appear to be used for rendering. You can have an
entirely different palette set there, and it will ignore it and use the
movie palette instead.
Fixes the inventory bar icons in Hell Cab.
Reset a few lingo the keywords on goto events.
the beepOn, 0
the keyDownScript, ""
the mouseDownScript, ""
the mouseUpScript, ""
Director 4 Lingo Dictionary p.102
Fixes the menu on the clock in hhouse.
Hhouse set some scripts to "dontPassEvent" and relied on Director
to reset their values when 'go' was called.
This is emitted by GCC if -Wredundant-decls is passed.
The Bison source files to generate this header should be modified to
fix this, but I am unclear on the required workflow.
If a bitmap cast member has a custom palette, createWidget() has a
routine to dither the image to the current score palette. However, this
needs to be done every time there is a change in palette, as the
dithering might not match, or not be necessary due to a matching
score palette.
Fixes the menu screen in the Mac version of Majestic Part 1.
easternmind-win-en, --start-movie=TRANSCRI/AUTODEMO.DIR, contains
over 1300 cast members. Since we're currently preloading everything,
buildbot is not happy as that takes longer than 20 secs.
D4 will throw an exception if you try and use a method on a disposed
object. In the editor this halts execution, in the projector this seems
to just be ignored. As there are games which rely on this ignorance,
we can't halt on a disposed object.
Fixes the EXE loader in Opera Fatal.
There is now _rtext, an untouched copy of the original data.
For compatibility, _ftext and _ptext are kept the same.
In addition, this change removes most of the workaround logic from
b_installMenu, as it can now parse the menu string directly.
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 windows specific test to open the FileIO XObject
doesn't test what it should test.
Since all lingo tests are ran as Mac D4.0.0 all the specific windows
checks aren't executed.
This fixes Fukuoka-Go-Round, which ends up passing the main EXE as a movie
to (re)open at runtime instead of a movie. Without this, clicking back to
the main menu crashes the disc.
Guard agains bug where the path is stripped incorrectly for:
`openXLib("C:\fileio.dll")`
The `.dll` part isn't stripped correctly when trying to open the files.
Previously, this would return the palette for the current frame (if it
was specified). Real Director behaviour is to return the current
palette in use, i.e. taking into account changes made in previous
frames.
When reading the palette ID from a BitmapCastMember, 0 or below
signifies a builtin palette and should be offset by -1. 1 or above
signifies a palette Cast ID.
Also make sure to compare like for like: a cast member ID needs to be
sent through resolvePaletteId to get the index in the actual palette
store.
Fixes palette swapping in the Lost Mind of Dr. Brain demo.
The resource fork in the Director 4 projector has a 16-color palette
right next to the 256-color System - Mac one, and the colors seem to
match the default System 4 palette. Nevertheless, this palette appears
to be reasonably different (both in colors and ordering) from the one
actually used. Included is a palette determined empirically from
DOSBox screenshots.
All of the builtin palette lookup tables have been reversed, to match
the original layout of the tables in the Director 4 projector executable.
This corresponds with the colour indexing used in Lingo.
Likewise, the code to load palettes from the cast no longer reads the
colours in reverse order, and shiftPalette no longer expects
the start index to be after the end index.
DirectorEngine::transformColor still exists to upgrade to 32-bit colour,
but no longer reverses the palette index.
The missing builtin 16-color palettes from Director 4 have been added.
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.
Previously, there was a workaround which would set score->_nextFrame to
the current frame. This meant that setting the stageColor in an
exitFrame handler would loop that single frame and softlock the movie.
The new approach re-renders the sprites and window inline, as we do
in several other spots.
Fixes frame progressions in Yaken Rodem.
Rodem tracks mouse movement outside the game window. It's not possible to
trigger Rodem's movement to the next screen to the left or right just by
moving the mouse cursor to the edge of the screen; it has to be tracked
outside the screen altogether.
This can be fixed by enabling ScummVM's desktop emulation. I've confirmed
this makes both the Mac and Windows versions playable. Since an existing
quirk already implemented this behaviour, I've renamed the existing
function and given it a more generic name.
Previously, all property list inserts would happen twice, causing
widespread mayhem. Property lists are allowed to have duplicate keys,
which may have disguised the impact of this bug.
Fixes lots of voice clips playing twice in DEVO Presents: Adventures
of the Smart Patrol.
It's possible to call a method designed for a me object with any
nonsense in the first argument. By design, this should look up the
clean function handler in the script context instead of the one in the
offspring object. However the "me" handle needs to be nulled out,
or else accessing properties will leak through from the previous
object.
Fixes saving games in DEVO Presents: Adventures of the Smart Patrol.
If the play state for the score stops for whatever reason, Lingo will
attempt to bail early so the movie can switch over. Freeze the state so
that we can pick up execution where we left off.
Fixes the location/time announcements in DEVO Presents: Adventures of
the Smart Patrol.
At first glance it would seem we could use funcSym.nargs for this,
except it is fixed to the number of args in the function definition.
We also can't derive it from the argument list that is sent through,
as it is truncated/padded with VOIDs. To keep things simple, track
paramCount as part of CFrame.
Previously, the Lingo state would be frozen by persisting the frames on
the bottom of the callstack with a special flag. This required extra
logic to determine whether or not the callstack was intended to be empty
after execution finished, with some complex edge cases.
The new approach is to swap out the LingoState object on the window,
meaning that an empty callstack always signifies execution has completed.
It remains to be seen if we'll need to track more than one frozen
context; for now it seems to be okay.
Fixes driving to locations in DEVO Presents: Adventures of the Smart Patrol.
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.
Fixed exit door in the7colors, where the frame had a looping
birds chirping sound together with the following Lingo:
if the soundbusy of 2 then go to the frame
And that led to an infinite loop and inability to pass through the
opened door.
The original apparently is returning 0 in-between the sound loops
since it manually restarts the sound after its completion. We, in
contrast, are optimizing that and using LoopedAudioStream
since f48dbb43b6
playStream() is called right after setting loopPtr, which was leading
to immediate reset of loopPtr. Thus, we were not able to control
the looping sounds
Remove uses of deprected `SeekableSubReadStreamEndian` in archive.cpp
The deprationwarning was:
Use SeekableReadStreamEndianWrapper with SeekableSubReadStream instead
The Director buildbot runs with the debugflag `fewframesonly`.
Each stdout/stderr line is send from a buildbot worker
to the master, parsed to check for errors and then stored
in a database. The less lines, the faster runs become.
Pippin videos for Lzone have resource fork and end up in MacBinary format.
This apparently fixes Pippin version of L-zone but I didn't check whether
it's completable.
* Gus in Cybertown (WIN)
* Haunted House (DEMO)
* Leonardo the inventor (WIN EN-PT)
* How the leopard got his spots (DEMO)
* The Mask (WIN)
* Yongzhe Paopao Long 2
Normally you can only change the width and height of a sprite when the
sprite is a puppet, and the stretch flag is set. Apparently for shapes,
all that's required is the puppet flag.
Fixes the mouse cursor bounding box in DEVO Presents: Adventures of the
Smart Patrol.
If a channel contains a 1-bit bitmap cast member, use the foreground
color instead of black when rendering in Background Transparent mode.
Fixes various text bitmaps in Total Distortion and iD4 Mission Disk 1.
Previously, frame scripts that called "delay" would have that adjustment
clobbered by Score::update().
Fixes the credits sequence in Nemurenu Yoru no Chiisana Ohanashi.
This was introduced in 3cae55dc3a due
to a bug encountered in Majestic. That was, however, a distinct bug
caused by something else, and the root cause was fixed in
9c3de4c269. Trimming whitespace broke
games which loaded paths that legitimately began with whitespace. This
notably broke Wacky Races (Mac, Japan), which has directories that begin
with a single space.
MacFontManager didn't have a mechanism to report which fonts it loaded
from an external resource. It also requires that any fonts that aren't
built-in be explicitly registered by name by the client before they can
be used. This combination meant that a client couldn't load fonts from
an external file and use them by their properties (id / size / style).
SCI contains Mac fonts in its executable along with a table that maps
each SCI font id to a Mac font id and size. The font name isn't a part
of this since the Classic Mac Toolbox API took id / size / style as
input when drawing text.
Now MacFontManager exposes the font families it has loaded along with
their names. This allows a client to see which fonts were loaded,
register them by name, and proceed to use them with the existing API.