Commit Graph
155 Commits
Author SHA1 Message Date
Eugene Sandulenko 53c485d85b DIRECTOR: Add catchers for unprocessed chunks 2020-08-27 18:00:44 +02:00
Eugene Sandulenko 45c49b1195 DIRECTOR: Load DVs only on demand 2020-08-21 10:52:08 +02:00
Eugene Sandulenko a6a809f1c3 DIRECTOR: Moved DV loading to castmember.cpp 2020-08-19 13:45:15 +02:00
Roland van Laar 062bf46ee5 DIRECTOR: Integer comparison fixes 2020-08-16 21:51:36 +02:00
djsrv 9ae219aff1 DIRECTOR: More gracefully handle missing BITD 2020-08-12 17:26:55 -04:00
djsrv baacf3c1ab DIRECTOR: Replace SeekableSubReadStreamEndian
Use the superclass SeekableReadStreamEndian.
2020-08-12 17:26:55 -04:00
djsrv 48be72b95a DIRECTOR: Load version from config 2020-08-10 15:00:55 -04:00
djsrv 0ff7274993 DIRECTOR: Multiply version numbers by 100
To accomodate minor version.
2020-08-10 15:00:55 -04:00
djsrv dabc82efdb DIRECTOR: LINGO: Don't add scripts w/o cast member 2020-08-04 21:25:58 -04:00
djsrv 88bb397147 DIRECTOR: LINGO: Load correct name table 2020-08-04 13:26:15 -04:00
Nathanael Gentry 6b830e2051 DIRECTOR: Replace hardcoded base palette ID
It seems that not all movies do have the palette ID starting at 1025, so we'll
just load them by iterating through the hashmap.
2020-08-04 00:28:00 -04:00
Nathanael Gentry acf93352b3 DIRECTOR: Properly activate D3 palette castmembers 2020-08-03 11:05:58 -04:00
Roland van Laar b339322d77 DIRECTOR: Fix compile error 2020-08-01 21:38:02 +02:00
Roland van Laar cc332e0a08 DIRECTOR: Load QuickTime movies based on path
DigitalVideoCasts have a directory and filename in their
castInfo. Use both, in combination with pathMakeRelative
to get the correct file.
2020-08-01 21:35:19 +02:00
Scott Percival 9852f49329 DIRECTOR: Add load hook for QuickTime movies 2020-08-01 23:15:12 +08:00
Roland van Laar fb3ae1d197 DIRECTOR: unwrap nested if 2020-07-29 15:47:10 +02:00
Nathanael Gentry 8084447e4d DIRECTOR: Trigger targets using picture castmembers
This is for the buildbot.
2020-07-27 18:55:36 -04:00
Nathanael Gentry 95f731d52f DIRECTOR: Rename loadSpriteImages
Resource children are not accessible to the castmember constructors, and palette
casts store their information in the child. So we load palettes in addition to
bitmaps here.
2020-07-27 18:04:12 -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
Nathanael Gentry b3b7ed19a4 DIRECTOR: Rework palette handling
Now there is no static for default palettes. All the defaults have negative ids
anyway, so those are just protected by the new setter method.
2020-07-26 23:46:06 -04:00
Nathanael Gentry 402a8fb117 DIRECTOR: Set default palette for pre-D4 versions 2020-07-26 20:28:20 -04:00
Roland van Laar 30e6f0a01d DIRECTOR: LINGO: Add scripts to the correct cast
Repair the castIds of script when the scripts are loaded.
The castIds that are defined in the scripts can be wrong.
A better way to link scripts with casts is via the scriptId.

To achieve this casts need to be fetched by their scriptId.
This commit implements the necessary getCastMemberByScript functions
to enable fetching a cast by it's scriptId.

Also removes the old way of repairing the castId coupling.
2020-07-27 00:48:51 +02:00
Nathanael Gentry c98cea16b4 DIRECTOR: Keep track of loaded palettes 2020-07-26 17:45:40 -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 14892f7f02 DIRECTOR: LINGO: GlobalScript -> EventScript 2020-07-24 17:12:39 -04:00
Nathanael Gentry c0d295f4f9 DIRECTOR: Load multiple palettes
Also, don't set the current palette upon loading it.
2020-07-24 13:53:43 -04:00
djsrv 4d99e3a80a DIRECTOR: Fix unhandled member type in VWCR 2020-07-23 11:54:46 -04:00
djsrv 40861f3dd8 DIRECTOR: Move flags1 to common cast loading
This seems to be present in pretty much every cast member even though
it's usually unused.
2020-07-23 11:38:13 -04:00
Eugene Sandulenko e693076558 DIRECTOR: Set the cast size for bitmaps, sounds and texts 2020-07-21 18:53:28 +02:00
djsrv e4caa3d514 DIRECTOR: LINGO: Fixed shared cast patching 2020-07-20 17:13:07 -04:00
djsrv 854300607c DIRECTOR: Fix mac name 2020-07-20 15:24:22 -04:00
Nathanael Gentry 0e6750d90c DIRECTOR: Load palettes from shared casts 2020-07-16 18:36:33 -04:00
djsrv a892bb58d1 DIRECTOR: LINGO: Fix D4 script loading
Script IDs are in cast info now.
2020-07-15 22:19:33 -04:00
djsrv 04c29cdf0c DIRECTOR: Don't load info for unloaded cast member 2020-07-15 21:42:38 -04:00
djsrv 3d1a68a3ed DIRECTOR: Improve file/cast info loading 2020-07-15 21:03:58 -04:00
Eugene Sandulenko 36940ed62e DIRECTOR: Fix script preprocessing 2020-07-15 12:10:09 +02:00
Eugene Sandulenko fbf9828923 DIRECTOR: Catch extra string in VWCI by buildbot 2020-07-15 11:11:48 +02:00
Eugene Sandulenko 5df8a294c6 DIRECTOR: Fix script loading 2020-07-15 01:52:07 +02:00
Eugene Sandulenko 8a9f5dec72 DIRECTOR: Load text formatting for CastInfo 2020-07-15 01:43:16 +02:00
Eugene Sandulenko 60390b5cdf DIRECTOR: Load edit info 2020-07-15 00:19:36 +02:00
Eugene Sandulenko 114aa89b71 DIRECTOR: Switch String arrays to data arrays 2020-07-15 00:19:36 +02:00
djsrv 8727d0a800 DIRECTOR: LINGO: Re-implement unused script list
List nodes are 0-indexed, and nodes can point to lower indices.
2020-07-14 18:16:19 -04:00
djsrv 413b28682b DIRECTOR: LINGO: Remove unused script handling
This breaks a lot of movies, so it obviously isn't right.
2020-07-14 16:55:25 -04:00
djsrv 339af7ef0e DIRECTOR: LINGO: Handle more Lctx fields 2020-07-14 16:34:41 -04:00
djsrv 63ea83d057 DIRECTOR: LINGO: Attempt to repair script type/ID 2020-07-14 13:04:44 -04:00
djsrv 6871ab1ea6 DIRECTOR: LINGO: Add LingoArchive destructor 2020-07-14 13:04:44 -04:00
Eugene Sandulenko 4f29c7c048 DIRECTOR: Added more CastMemberInfo fields 2020-07-14 17:29:14 +02:00
djsrv b2c20a07f7 DIRECTOR: LINGO: Refactor Object
This turns Object into a template so any type can easily act as a Lingo
object. For example, script objects no longer own a script context.
They *are* script contexts, and there are custom getters/setters for
methods and properties.
2020-07-07 16:59:55 -04:00
Eugene Sandulenko 18ce56fc1b DIRECTOR: Create path for the dumped scripts 2020-07-07 12:33:40 +02:00
Eugene Sandulenko d07e91a422 DIRECTOR: Improved warnings 2020-07-07 12:30:59 +02:00