This patch implements events for scrolltype text cast members, callbacks
in MacTextWindow is used to redirect events to director engine.
`ATD\HD\bbTWRFL2.DXR@392` of 'totaldistortion-win' uses `mouseUp` score
script attached to scrolltype text cast member, which when clicked calls
`getMouseLine` to find the clicked book, thus opening it.
According to "Director in a Nutshell, page 15", autoPuppet unlike
puppet is not a single property, instead it is individual for each
sprite property, ie we can have auto-puppet locH of sprite, but
other properties are not auto-puppet.
This change adds support for individual auto-puppet properties.
Initially, all the changes to sprite location (ie set the locH..) was
being assigned to _currentPoint, which is not carried over to sprite,
thus the changes were not being applied.
Fixes bullet not showing when firing gun in
--start-movie="ATD\HD\bdDREAMA.DXR" totaldistortion-win
Dropping D6+ checks there were a speculation which let Dream sequence
in totaldistortion work. However, that had a side effect that the ink
was not copied, as the channel was declared autopuppet.
This restores the ink behaviour while keeping shooting as working
--start-movie="ATD\HD\bdDREAMA.DXR" totaldistortion-win
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 check against puppet: wrong, it even gets autopuppeted
We used to check against stretch: wrong, we just do not stretch the sprite
This properly fixes cursors in devo and darkeye without disabling setting
the rect property.
See commit 18f140ef91
[Based on Director in a Nutshell, page 15]
The following properties of a sprite are auto-puppeted whenever
the property is set: backColor, blend, editable, foreColor, height,
ink, loc, locH, locV, member, moveable, rect and width. Auto-puppeting
of individual properties has no effect on the puppet of sprite property
['Lingo Dictionary' 601 Fixes]
Sprites now have a duration as specified in the (new) score view.
When lingo modifies any of the sprite properties that property
will be auto-puppeted, i.e. the value set will stick for the
duration of that sprite despite any values recorded in the score.
This can cause existing lingo which relied on setting the property
of a sprite without the use of 'puppet' to behave differently.
Calling 'puppetSprite spriteNumber, FALSE' will also clear any
currently auto-puppeted properties.
In original engine it is possible to set non-puppted sprite properties
like position, backcolor etc and then call updatestage to update the
screen according to property. This is undocumented behaviour
which is not present depicted in any books however with rigorous testing
it is found to be true. This change only persist for the current frame
and once the playback head is moving the change is lost.
`ATD\HD\bdDREAMA.DXR` of 'totaldistortion' used some of this quirk to
display moving bullets.
Lingo `set the immediate of sprite` is getting lost when we copy over
the sprites to the channels. Now we inherit this setting in the copy.
Fixes 'PopUp Menu' in theapartment: without this fix we are losing the
interactivity as soon as we select a pop-up menu item once.
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.
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 this would be updated in
DigitalVideoCastMember::createWidget, which meant it was possible for a
movie to complete without updating _movieTime to the final end position.
Fixes the cupcakes from not stopping animating once the song is finished
in Chop Suey.
Blit operations in Director expect that the "white" and "black" color
indexes are at 255 and 0, respectively. Fetching these values from
the window manager is not reliable when the palette has multiple
indexes sharing a color (e.g. blackPalette and whitePalette), which will
mean the applyColor flag is incorrectly set to true when foreColor and
backColor are the correct values.
Fixes fade from white when entering the door to the Land of Desire in
Eastern Mind.
Sprites stored in frames are referenced by position (minus the
registration offset), width and height. Film loops are the same. As
such, fix the bounding box calculation for the film loop to use the
correct sprite positions (e.g. center for bitmaps), then fix the
subchannel generator to take these into account.
The engine treats film loops as N full channels getting rendered to the
screen in the space of one. As such, it's impossible to pre-blit together
the content, as any blitter mode can be used for each of the items.