Commit graph

223 commits

Author SHA1 Message Date
ysj1173886760
ecce34593e DIRECTOR: combine renderVideo and updateWidgets. 2021-08-20 20:59:48 +08:00
ysj1173886760
d69144fa18 DIRECTOR: introduce updateWidget to fix updateStage. 2021-08-20 20:53:44 +08:00
djsrv
19dab8f130 DIRECTOR: Set cursors per-movie, not globally 2021-08-06 01:11:49 -04:00
djsrv
ff16d808c7 DIRECTOR: LINGO: Play puppet sounds in updateStage 2021-07-27 22:54:25 -04:00
djsrv
a16d823201 DIRECTOR: Improve puppetSound
Most variants of puppetSounds don't actually start the sound immediately
but wait until the frame is updated. So I've created a SoundID struct
which stores a reference to a cast member or externals sound, and that
is used to store the puppetSound until it's actually supposed to start.
In addition, puppet status is now per-channel instead of a universal
flag.
2021-07-27 22:54:16 -04:00
djsrv
7b7d351a54 DIRECTOR: Use updateVideo instead of renderFrame in b_updateStage
This partially reverts
30f0b3995a.
I mistakenly stated that we need to re-render the entire frame in
b_updateStage in that commit, but that was incorrect.
This fixes a regression in Chop Suey's cursors.
2021-07-24 01:44:27 -04:00
djsrv
f1a7d94f2d DIRECTOR: Don't use renderFrame for video updates
This adds a renderVideo function which updates a frame's digital video
and nothing else. renderFrame resets all sprites to what's stored in the
score which is an unwanted side effect.
2021-07-24 01:44:27 -04:00
ysj1173886760
876f998a05 DIRECTOR: check and play queued fplay sound in score. Amend the implementation of playFPlaySound 2021-07-19 10:41:22 +08:00
djsrv
43378b81e4 DIRECTOR: Remove unused render modes 2021-07-16 14:46:21 -04:00
djsrv
30f0b3995a DIRECTOR: Always call renderFrame in updateStage
If we don't do this, nothing is actually updated.
2021-07-16 14:46:21 -04:00
ysj1173886760
9ef812b0ba DIRECTOR: implement playing external sample sounds in score 2021-07-14 18:00:50 +08:00
djsrv
615995fdc1 DIRECTOR: Change member refs to use CastMemberID 2021-06-30 22:32:19 -04:00
ysj1173886760
2ea18a03fb DIRECTOR: add getOriginalSpriteById to score, which allowing us modify the original sprite data instead the one we store in channel 2021-06-26 16:08:20 +02:00
djsrv
eee17da97a DIRECTOR: Add Score::getSpriteIdByMemberId 2021-06-10 10:57:19 -04:00
djsrv
ed8ca876e3 DIRECTOR: Use version from VWCF for loading 2021-06-07 14:48:48 -04:00
Eugene Sandulenko
92bd514902 DIRECTOR: LINGO: Make sure video is rendered on 'updateStage' 2020-08-25 10:43:47 +02:00
Nathanael Gentry
73c970421f DIRECTOR: Re-render changed cursors on new frame 2020-08-19 16:31:36 -04:00
Nathanael Gentry
d7ec21cbeb DIRECTOR: Properly discover sprite cursors
We canot just use getSpriteIDFromPos, as Director gets the cursor from the
topmost sprite that has a non-empty cursor.
2020-08-19 10:41:55 -04:00
djsrv
baacf3c1ab DIRECTOR: Replace SeekableSubReadStreamEndian
Use the superclass SeekableReadStreamEndian.
2020-08-12 17:26:55 -04:00
djsrv
9c537a8744 DIRECTOR: Rename Stage to more general Window
The stage and windows are the same type of thing, but the stage only
refers to one particular window.
2020-08-04 23:54:09 -04:00
Eugene Sandulenko
519ef9d172 DIRECTOR: LINGO: Implement 'the frameLabel' 2020-08-04 23:36:41 +02:00
djsrv
a7ca8a0b2c DIRECTOR: Get rid of busy wait for click loop 2020-08-04 15:14:05 -04:00
Nathanael Gentry
adb725c223 DIRECTOR: Update frame before enabling puppet
This is a workaround for Majestic's main menu, to get hovering over the text
options to show the proper highlighting. This just applies to the old
puppetSprite lingo syntax
2020-07-29 12:54:42 -04:00
Nathanael Gentry
ea75044ae1 DIRECTOR: Load palette castmembers
The loadPalette is also turned into a value-returning function.
2020-07-27 18:04:12 -04:00
djsrv
054b8ddeb0 DIRECTOR: Improve mouse event handling 2020-07-27 16:42:42 -04:00
djsrv
33d07334eb DIRECTOR: Replace isFocusable with respondsToEvent 2020-07-27 12:51:51 -04:00
Nathanael Gentry
3cb5b5acb4 DIRECTOR: LINGO: Implement kTheFramePalette 2020-07-26 23:46:06 -04:00
Nathanael Gentry
013c7276e7 DIRECTOR: Implement basic puppetPalette
Right now, only changing the palette itself is supported. Fades and other fancy
features will come later, as needed.
2020-07-26 23:46:06 -04:00
djsrv
fbf42314bb DIRECTOR: Add pointers to frame, sprite parents 2020-07-24 11:03:35 -04:00
Nathanael Gentry
0044225060 DIRECTOR: Make sound fade non-blocking 2020-07-22 14:13:38 -04:00
Nathanael Gentry
ae1af9c06a DIRECTOR: Fix matte intersection check
Actually, it's not applied indiscriminately. It only take effect when there is
already a matte ink on the given sprite.
2020-07-21 23:12:54 -04:00
Eugene Sandulenko
2a484dda5b DIRECTOR: Pass strings by references 2020-07-21 23:55:10 +02:00
Eugene Sandulenko
896ff77946 DIRECTOR: Implement 'the labelList' 2020-07-21 23:35:45 +02:00
Eugene Sandulenko
d70c3475c5 DIRECTOR: Implement getting labels by name 2020-07-21 23:35:45 +02:00
djsrv
1d0f8db46a DIRECTOR: Get rid of blocking loops 2020-07-21 17:34:22 -04:00
Nathanael Gentry
6b404187fc DIRECTOR: Move mouse position check to channel
This permits, for instance, only changing the cursor when we are inside a
bitmapped sprite.
2020-07-21 15:11:34 -04:00
Nathanael Gentry
5fb984e99f DIRECTOR: Mostly implement cursor of sprite 2020-07-18 00:37:57 -04:00
Nathanael Gentry
0f5cc7cca8 DIRECTOR: Don't look only for focusable sprites
Instead, there is an option to return the topmost non-focusable sprite, too.
Some scripts don't have buttons on them; they are just there for the hilite.
2020-07-13 17:32:54 -04:00
Nathanael Gentry
0bffd5d616 DIRECTOR: Reorganize control of DirectorPlotData
The Channel is also made into a class.
2020-07-09 13:31:32 -04:00
djsrv
324ecfa880 DIRECTOR: Play MIAWs 2020-07-09 12:20:39 -04:00
djsrv
04f457c46b DIRECTOR: Add _playState to Score 2020-07-09 12:20:39 -04:00
Nathanael Gentry
25dcbc3cf8 DIRECTOR: Move TransParams to stage 2020-07-08 13:44:02 -04:00
Nathanael Gentry
8a85754f25 DIRECTOR: Move Channel to its own file 2020-07-08 13:44:02 -04:00
Nathanael Gentry
b248f432e9 DIRECTOR: Finish implementing constraint of sprite 2020-07-07 23:21:16 -04:00
Nathanael Gentry
ca5be75426 DIRECTOR: Optionally force apply a matte mask 2020-07-06 11:37:01 -04:00
Nathanael Gentry
80cc7ba64f DIRECTOR: Split out stage blitting functions
Now there is inkBlitShape, for QuickDraw shapes which do not have surfaces of
their own, and inkBlitSurface, for sprites that do have their own surfaces.
2020-07-06 11:37:01 -04:00
Eugene Sandulenko
28836aad2d DIRECTOR: Init TransParams 2020-07-06 12:38:14 +02:00
djsrv
07bc3e58e8 DIRECTOR: Remove vm arg from constructors
Pass the object's direct parent instead, and get things like the stage
from that instead of from the _vm when possible.
2020-07-03 15:55:14 -04:00
Nathanael Gentry
a8b779ee0e DIRECTOR: Lazily load ink masks
This is for mask and matte inks. Now, rather than a bitmap sprite requiring a
flood fill every time (for mask ink) the matte is created and cached when matte
ink is first requested on that cast. Mask ink does not require a new surface to
be created, but it uses the same new channel interface.
2020-07-03 13:19:06 -04:00
Nathanael Gentry
a25467c6df DIRECTOR: Finish implementing puppetTransition 2020-07-01 13:10:07 -04:00