Exiting a transition early should result in the target palette.
In addition, mouseDown and keyDown events are enough to register a
transition skip, not mouseUp.
Fixes palette glitches in Majestic.
After creating a bunch of tests, it is clear that the choice of what
mouseDown/mouseUp handler in the hierarchy to use is determined just
before running it. This was a problem, as we were caching that
information up-front when processing the input events, and it is
entirely possible for e.g. a mouseDown handler to jump to another frame,
which would affect which subsequent mouseDown/mouseUp handlers to call.
Fixes director-tests/D4-unit/T_EVNT01 to T_EVNT11.
If you trigger e.g. a mouseDown and a mouseUp event, the mouseUp event
should not be run until the mouseDown event has returned.
Fixes director-tests/D4-unit/T_EVNT03.DIR
Taking coordinates directly from the event manager could introduce
subtle timing problems, and makes it near-impossible to inject fake
events into the pipeline for testing.
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.
Frames are now loaded on demand, when they are first accessed. Also
the starting offsets of each frames are stored in a special array, so
any previously visited frame might have quick access time. Much of the
work is done in Score class itself.
Warning: This commit is not yet complete. There are various issues
and crashes on the way.
Demand loading of frames is implemented to replicate the behavior of
the original engine. The original engine does not load frames until
it is accessed, this property when used with lingo is exploited to
allow changes in sprite properties when there is no next frame changes
of that property. In essential what happened was that for a non puppet
sprites, the game can have its property changed and rendered until there
was full refresh (in form of jumps, etc) of screen. This was not possible
with precached frames.
The first example use was seen in movie `ATD\HD\bdDREAMA.DXR` of game
'totaldistortion-win'.
Implement conditions for the modal to show:
- reset the QUIT event to prevent the modal from closing immediately
- only show the modal when exitLock is set by the program
The goal is to ask user confirmation when the property exitLock is set.
Director would prevent the user from quitting in such a case.
Note: The modal doesn't show up.
Before, the code for setting a button's hilite flag made it so that
mouseUp only ever went to the last sprite that had a mouseDown
event. That is not correct. Whatever sprite the mouse goes up on
gets the event, even if it didn't get the last mouseDown event.
processTransitionEvent skipped passing events to the window manager
and sent them directly to the current window, which is no good since the
event may need to go to another window. It also broke stopping
transitions on click.
those two are aimed for the situation that when we hold the button and move out of the bounds, then we should de-activated the sprite
_currentHilite are for Bitmap castmember inverting. _currentHandling is for other castmembers, such as macbutton which has it's own check. And also for those sprites which don't need to hilited