Commit Graph
70 Commits
Author SHA1 Message Date
Nathanael Gentry 828595c9fc DIRECTOR: Don't override shape dimensions 2020-08-21 16:52:07 -04:00
Nathanael Gentry 0bab9810c0 DIRECTOR: Fix getWidgetRect code path
This is morally equivalent to getWidgetRect, but takes into account the changes
to dimensions that MacText makes for borders and gutters and a text shadow.
Thus, these features are working again.
2020-08-21 16:34:06 -04:00
Eugene Sandulenko 3f160561d6 DIRECTOR: Fixed for 32bpp mode, things work 2020-08-16 23:08:33 +02:00
djsrv 0ff7274993 DIRECTOR: Multiply version numbers by 100
To accomodate minor version.
2020-08-10 15:00:55 -04:00
Nathanael Gentry e46e81f505 DIRECTOR: Add castNum to null cast warning 2020-08-10 11:58:33 -04:00
Scott Percival 628273226b DIRECTOR: Move digital video properties to channel 2020-08-01 23:15:12 +08: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
Scott Percival 4bfffc43a7 DIRECTOR: Move widgets from cast members to channels (#2372)
This change is required to support copies of the same cast member running in different channels.

* DIRECTOR: Move widget ownership from cast member to channel

* DIRECTOR: Cache cast dimensions from createWidget

* DIRECTOR: Add null checks for createWidget

* GRAPHICS: MACGUI: Clear active/hover WM references if the widget is destroyed

* DIRECTOR: LINGO: Re-add null check for kTheEditableText

* DIRECTOR: Avoid destroying widgets if the channel isn't dirty

* DIRECTOR: Fix dirty test

* DIRECTOR: Fix text field writeback

* DIRECTOR: Fix null cast check

* DIRECTOR: Add bbox as argument to createWidget

* DIRECTOR: Add setCast method to Channel

* DIRECTOR: Fix use-after-free in Channel::getMask

* DIRECTOR: Fix bounding box for Button sprites

* DIRECTOR: Cache widget dimensions in cast member

* DIRECTOR: Remove widget from channel if nextSprite is empty

* GRAPHICS: MACGUI: Fix MacText::splitString for empty string case

* DIRECTOR: Add null checks for movie and score in processEvents
2020-07-26 04:32:29 +00:00
djsrv eae6ab03ec DIRECTOR: Use parent movie in sprite methods 2020-07-24 11:03:35 -04:00
djsrv fbf42314bb DIRECTOR: Add pointers to frame, sprite parents 2020-07-24 11:03:35 -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 c6d7766209 DIRECTOR: Keep sprite dimensions in channel 2020-07-09 23:40:01 -04:00
Nathanael Gentry 2f12428b71 DIRECTOR: Generalize sprite dimension getter 2020-07-07 09:36:29 -04:00
Nathanael Gentry 5ab3544c5c DIRECTOR: Improve sprite/cast type integration
Now, rather than having a _castType in the sprite, I fixed the issue that might
have made this necessary in the first place -- overloading _castId with the
shape pattern whenever the sprite is a QuickDraw shape. There is now a separate
test function for QuickDraw shapes.
2020-07-06 11:37:35 -04:00
Nathanael Gentry 091458b2b5 DIRECTOR: Split out two different sprite focus methods 2020-07-06 11:37:01 -04:00
djsrv 38d17341e2 DIRECTOR: LINGO: Move lingo archive to Cast 2020-07-01 22:07:13 -04:00
djsrv fb39572fd5 DIRECTOR: Move _sharedCast to Movie 2020-07-01 13:24:37 -04:00
Eugene Sandulenko 5186f7194b DIRECTOR: Reduce header dependency 2020-07-01 17:49:48 +02:00
djsrv 3303ab985e DIRECTOR: Rename cast.cpp -> castmember.cpp 2020-07-01 10:50:31 -04:00
Nathanael Gentry 713f9f2624 DIRECTOR: Unify sprite and channel internal rendering methods
Now we only need to check with the channel to see if its contents need to be
re-rendered, and the channel takes care of updating its internal locations, as
well as those of the widgets.
2020-06-30 12:38:46 -04:00
Nathanael Gentry 487dcec139 DIRECTOR: Remove shape cast hack 2020-06-30 12:38:46 -04:00
Nathanael Gentry 93a5c39381 DIRECTOR: Cache widgets for all loaded cast 2020-06-30 12:38:46 -04:00
Nathanael Gentry d04934a54f DIRECTOR: Move rendering to a Stage class
This commit introduces several changes to the rendering pipeline.

 - Rather than having a window for each score that is played, there is a Stage
   in g_director that is only cleared when the upcoming stage has a different
   size. This permits transitions still clean transitions between movies.

 - Rather than relying upon general surface blitting functions, there is
   progress toward a custom blitter than makes working with inks much easier. A
	 pixelwise function, inkDrawPixel, has been introduced.

 - The mask-based approach to incremental rendering has been abandoned, as it
   caused performance issues and strange rendering bugs. Now the renderer
	 operates on a traditional list of dirty rects that must be redrawn.

 - QuickDraw shapes are more closely integrated with the renderer, and they do
    not require a temporary surface to draw.
2020-06-30 12:38:46 -04:00
Nathanael Gentry eb51188b40 DIRECTOR: Synchronize widget dimensions 2020-06-23 23:26:50 -04:00
Nathanael Gentry 8d25169605 DIRECTOR: Implement rudimentary constraint of sprite 2020-06-18 18:12:32 -04:00
djsrv af62c56624 DIRECTOR: Consider sprites with CastScripts active 2020-06-17 20:38:49 -04:00
Nathanael Gentry fad94268a9 DIRECTOR: Send mouse events to actionable sprites first 2020-06-17 14:28:08 -04:00
Nathanael Gentry 5639b0e7f6 DIRECTOR: Improve sprite position calculations 2020-06-17 12:08:54 -04:00
Nathanael Gentry 75210d8186 DIRECTOR: Render sprites from channel structs
Among other rendering issues, this fixes the annoying jittery sprites issue when
a sprite is simultaneously animated and moveable.
2020-06-17 09:07:35 -04:00
Scott Percival 7c9ed6febb DIRECTOR: Add new SpriteChannel class
Some sprite properties are considered global across all frames.
This can be seen in Chop Suey where e.g the exitFrame script for
frame 1 will change the visibility on sprite channels that aren't used
until frame 3. This adds a new global list of sprite channel properties
that aren't attached to a Frame.

This just tracks visibility for now, additional properties can be moved
over from Sprite when they are confirmed to be global.
2020-06-17 00:33:26 +08:00
Eugene Sandulenko feffb0c99c DIRECTOR: Initialize variable. Oppsie 2020-06-15 12:15:50 +02:00
Nathanael Gentry 24da65e1b9 DIRECTOR: Implement changing width/height of sprite for basic inks 2020-06-13 14:33:35 -04:00
Scott Percival 21f28bc8e6 DIRECTOR: Fix Sprite::getBbox() to check for null widget 2020-06-10 22:10:16 +08:00
Nathanael Gentry c3bfd99d50 DIRECTOR: Render bitmaps with widgets 2020-06-10 15:42:49 +02:00
Nathanael Gentry 3095637e60 DIRECTOR: Convert texts to buttons if necessary 2020-06-10 15:42:49 +02:00
Nathanael Gentry a2e230803d DIRECTOR: Render texts and buttons with widgets 2020-06-10 15:42:49 +02:00
djsrv 865201b9fc DIRECTOR: LINGO: Implement kTheImmediate 2020-06-03 22:22:01 +02:00
Nathanael Gentry d82a37ab0d DIRECTOR: Fix setCast member condition 2020-06-01 19:00:27 +02:00
Scott Percival 49e28f9dbc DIRECTOR: Fix Sprite::getBbox() for kCastButton 2020-05-25 22:56:08 +08:00
Scott Percival 5c337d4536 DIRECTOR: LINGO: Implement kTheClickOn 2020-05-23 22:12:33 +08:00
Scott Percival 7be0816f3f DIRECTOR: Move sprite bounding box calculation into class method 2020-05-23 21:33:51 +08:00
Scott Percival b96dabbaac DIRECTOR: Move Sprite Cast updates into a class method 2020-05-20 00:56:24 +08:00
Scott Percival c0a8205961 DIRECTOR: Fix undefined sprites when calling kEventStartMovie 2020-05-20 00:01:10 +08:00
Nathanael Gentry 3fa90b4ade DIRECTOR: Move from drawRects to bboxes 2020-05-17 23:21:33 +02:00
Scott Percival 91d1bf0ce3 DIRECTOR: Remove duplicate type field in Sprite 2020-05-05 23:06:37 +08:00
Eugene Sandulenko c879fd4d54 DIRECTOR: Added puppet flag to Sprite 2020-04-14 23:43:03 +02:00
Eugene Sandulenko 1308feadb9 DIRECTOR: Moved MacWidget from Sprite to Cast to avoid duplication 2020-04-13 14:50:42 +02:00
Eugene Sandulenko d526f340fb DIRECTOR: Initial plug in for MacEditableText 2020-04-12 01:46:02 +02:00
Eugene Sandulenko d6c839dc8c DIRECTOR: Removed redundant Sprite copy constructor 2020-04-12 01:46:02 +02:00