Commit Graph
272 Commits
Author SHA1 Message Date
Scott Percival 6c6565bbe5 DIRECTOR: Clear cast ID in D2 when sprite is a shape
Fixes various graphical artifacts, e.g. movie ENG:J11@230
of Spaceship Warlock having a big steam cloud in the top-left instead of
the left-turn hotspot, the Invictus logo in Over-Ring-Under having a
large white box to the right of the text.
2024-02-09 21:17:57 +08:00
Scott Percival 8b9d989c73 DIRECTOR: Re-add tracking of current tempo
Re-adds the support removed in e13eba2162

Fixes the puppetTempo example in Lingo Dictionary.
2024-01-08 02:54:14 +01:00
kartiksharmakk 164620e6e6 DIRECTOR : Fix physical energy game bar not filled in total distortion.
It is partial revert of 3cb61c54d7

Steps to reproduce:
1. Start Total Distortion
2. Start a new game / load game
3. Click on the "Options" button
4. The physical energy bar is not visible

Trello card : https://trello.com/c/mpZTlPoZ/628-physical-energy-game-bar-not-filled
2023-11-21 20:19:35 +01:00
Eugene Sandulenko 8bccc12786 DIRECTOR: Reduce header dependency 2023-08-02 21:05:06 +02:00
Eugene Sandulenko 05c97e3e7e DIRECTOR: Move sprite dimensions sanity cleanse deeper in frame loader
Since filmloop casts call the Sprite Data loading methods directly,
we want to fix the possible negative dimensions there.

Fixes starup of sequencer video in totaldistorion

  --start-movie="ATD\HD\ADTDVSVF\TDVIDDB1.DIR" totaldistortion-win
2023-07-27 14:23:44 +02:00
Eugene Sandulenko 220a54cd08 DIRECTOR: Print out unprocessed SCVM fields only when they're non-zero 2023-07-23 10:21:36 +02:00
Scott Percival 3f92dd47e6 DIRECTOR: Fix edge cases in Frame::readMainChannelsD5 2023-07-20 16:19:20 +02:00
Harishankar Kumar 05c03891b8 DIRECTOR: auto-puppet skip individual properties in frame loading
It has been mentioned in "Director in a Nutshell, pg 15" that
auto-puppet is first introduced in D6, therefore completely
dropping checks for D2-D5. Also added code that skips individual
property of a frame if that specific property is found it be
auto-puppet.

eg, A sprite has change in `locH` and `blend`, and blend is auto-puppeted
(it was set somewhere before, and autoPuppet flag for this bit is true),
then that means frame loading will only skip any changes made to `blend`
and will load `locH` as usual.
2023-07-19 14:57:59 +02:00
Harishankar Kumar b1da9423b9 DIRECTOR: Refactor scoreCachedPaletteId to frames loading
Move caching logic of scoreCachedPaletteId from Score to Frame.
2023-07-19 14:57:59 +02:00
Harishankar Kumar 329e63b662 DIRECTOR: Refactor main channels into struct
Main channels of frame is now refactored into struct, this is
to make it easier to copy/add more flags and integrate it with
frames loading.
2023-07-19 14:57:59 +02:00
Scott Percival 889130a3fa DIRECTOR: Share Sprite parsing code between Frame and FilmLoopCastMember 2023-07-16 14:01:48 +02:00
Eugene Sandulenko 013b8c3068 DIRECTOR: Simplified offset calculation in channel loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 7a4456785b DIRECTOR: Split D2 channel loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 85c11d9b5a DIRECTOR: More channel loading split 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 00cacd4fdb DIRECTOR: Split more D4 channel loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 564482ac8f DIRECTOR: Remove now obsolete Frame::readChannels() 2023-07-10 16:03:11 +02:00
Eugene Sandulenko f04dc8b105 DIRECTOR: More splits for D5 channel loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko e59fe04d0f DIRECTOR: Added sanity checks to frame loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 6c179cd213 DIRECTOR: D5 score loading fixes 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 4eadd3b7bf DIRECTOR: Reset frame fully on rewind. This fixes D2-D3 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 0ce2892a19 DIRECTOR: Initial code for incremental D6 frame loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 5b964c31d6 DIRECTOR: Initial code for incremental D5 frame loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko f8a7541bbb DIRECTOR: JANITORIAL: Rearrange channel loading methods in logical order 2023-07-10 16:03:11 +02:00
Eugene Sandulenko c25f7663e4 DIRECTOR: Incremental frame loading for D2 2023-07-10 16:03:11 +02:00
Eugene Sandulenko c849d2423c DIRECTOR: Skip autopuppet sprites on channel loading 2023-07-10 16:03:11 +02:00
Eugene Sandulenko 4245cc2607 DIRECTOR: Initial frame loading refactoring
D4 is working, rhe rest is broken
2023-07-10 16:03:11 +02:00
Scott Percival ec76e5dfc6 DIRECTOR: Refactor palette loading for D5
Previously, the palette ID namespace was shared between cast ID, builtin
ID and resource fork ID. This was quite messy.

The new approach is to use CastMemberID; builtin palettes are libId -1,
cast palettes use their respective libId, and a null CastMemberID
indicates a blank entry.
2023-05-10 09:48:50 +02:00
Scott Percival 3b13e8ff43 DIRECTOR: Support D5 loading multiple casts
In D5 and up, you can have multiple casts in the same movie, along with
external casts. Unlike shared casts these are different namespaces;
each movie maps the casts to a libId, which is then used by
CastMemberID.castLib.

For D4 and below, the default cast libId is now represented by
DEFAULT_CAST_LIB. This should make refactoring easier in future.
2023-05-10 09:48:50 +02:00
Scott Percival b2c0255912 DIRECTOR: Improve frame parser for D5 2023-04-29 14:20:05 +02:00
Scott Percival 3cb61c54d7 DIRECTOR: Fix kInkTypeBlend, remove redundant _blend field on Sprite 2023-03-16 14:46:18 +01:00
Scott Percival 8eb6cd2ac0 DIRECTOR: Allow for palette changes when seeking to arbitrary frames
In Director, palette IDs in the palette channel apply to all subsequent
frames. If we seek to an arbitrary frame, the correct palette
should be applied.

Fixes the introductory cutscene in Majestic: Part 1.
2023-03-06 21:26:28 +01:00
Eugene Sandulenko 7d6018e663 DIRECTOR: Implement and use spriteType2str() 2023-02-13 16:24:46 +01:00
Scott Percival 26fad071c0 DIRECTOR: Read palette ID as signed int for D3 2023-01-10 13:41:53 +01:00
Scott Percival 1524ee3615 DIRECTOR: Fix coloring of 1-bit bitmaps
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.
2022-11-18 16:28:05 +01:00
Scott Percival 2a261d0fba DIRECTOR: Allow for tempo changes when seeking to arbitrary frames
In Director, FPS entries in the tempo channel apply to all subsequent
frames. If we seek to an arbitrary frame, the correct tempo settings
should be applied.

Fixes the animation speeds of the cauldron and the walking teapot in
Chop Suey.
2022-10-06 00:05:17 +02:00
Scott Percival 8d29dec888 DIRECTOR: Implement channels debugger command 2022-09-20 20:17:06 +02:00
Scott Percival e460102c77 DIRECTOR: Simplify D3 palette-loading code
Fixes Invictus logo animation in Alice: An Interactive Museum.
2022-09-12 15:52:18 +02:00
Scott Percival 7de1d320a0 DIRECTOR: Add more palette transition modes 2022-09-12 15:52:18 +02:00
Scott Percival 076423de8a DIRECTOR: Implement color cycling 2022-09-12 15:52:18 +02:00
Scott Percival 9163b939c4 DIRECTOR: Improve Frame::readChannels() logging 2022-09-12 15:52:18 +02:00
Misty De Meo 3c43b40fd5 DIRECTOR: only print frame logs when non-0 2022-07-09 22:15:51 +02:00
Eugene Sandulenko e42610c3bf DIRECTOR: Added more debug output to frame loading 2022-06-28 17:28:11 +02:00
Misty De Meo 6f78d0e47e DIRECTOR: fix palette regression
7f0d69367b introduced a fix for
fetching the palette. However, it misinterpreted the number as an
unsigned int instead of a signed int, leading to incorrect palettes
on certain other games.
2022-06-23 11:35:50 +02:00
Pragyansh Chaturvedi (r41k0u) 7f0d69367b DIRECTOR: Fix Palette loading wrong Palette index 2022-06-12 15:20:49 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Scott Percival 6d32f570f5 DIRECTOR: Rework film loops to render as channels
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.
2021-11-07 12:05:29 +08:00
Eugene Sandulenko 9f0534445b DIRECTOR: Read second sound channel info in D4 on all platforms 2021-08-17 17:13:35 +02:00
Eugene Sandulenko 84cddcf3f6 DIRECTOR: Initial support for l-zone MacII 2021-08-13 17:35:38 +02:00
djsrv 615995fdc1 DIRECTOR: Change member refs to use CastMemberID 2021-06-30 22:32:19 -04:00
djsrv ed8ca876e3 DIRECTOR: Use version from VWCF for loading 2021-06-07 14:48:48 -04:00