Commit Graph
628 Commits
Author SHA1 Message Date
Scott Percival 7a3ce2ff5c DIRECTOR: Don't render color cycling in few frames mode 2023-01-10 13:41:53 +01:00
Scott Percival fb4d1f3bfe DIRECTOR: Make bitmap color correction ignore color cycling operations
Fixes the logo sequence in Alice: An Interactive Museum.
2023-01-10 13:41:53 +01:00
Scott Percival f61e06a752 DIRECTOR: Fix Score::getCurrentPalette()
Previously, this would return the palette for the current frame (if it
was specified). Real Director behaviour is to return the current
palette in use, i.e. taking into account changes made in previous
frames.
2023-01-10 13:41:53 +01:00
Scott Percival 48740a2ad1 DIRECTOR: Remove all palette reversing workarounds
All of the builtin palette lookup tables have been reversed, to match
the original layout of the tables in the Director 4 projector executable.
This corresponds with the colour indexing used in Lingo.
Likewise, the code to load palettes from the cast no longer reads the
colours in reverse order, and shiftPalette no longer expects
the start index to be after the end index.

DirectorEngine::transformColor still exists to upgrade to 32-bit colour,
but no longer reverses the palette index.

The missing builtin 16-color palettes from Director 4 have been added.
2023-01-10 13:41:53 +01:00
Scott Percival 7c975eff43 DIRECTOR: LINGO: Adjust freezing/thawing behaviour 2022-12-09 01:10:57 +01:00
Scott Percival 3ea7f10467 DIRECTOR: Freeze LingoState instead of using callstack
Previously, the Lingo state would be frozen by persisting the frames on
the bottom of the callstack with a special flag. This required extra
logic to determine whether or not the callstack was intended to be empty
after execution finished, with some complex edge cases.

The new approach is to swap out the LingoState object on the window,
meaning that an empty callstack always signifies execution has completed.
It remains to be seen if we'll need to track more than one frozen
context; for now it seems to be okay.

Fixes driving to locations in DEVO Presents: Adventures of the Smart Patrol.
2022-12-09 01:10:57 +01:00
Scott Percival 873095c87e DIRECTOR: Move current Lingo state into Window-owned struct
The previous arrangement was to copy the bits of Lingo state back and forth from
the Window object to the Lingo instance, and query the window for the
callstack. This refactor consolidates the current Lingo state into a single
struct, owned by the Window object and accessible via a pointer on the
Lingo object.
2022-12-09 01:10:57 +01:00
Eugene Sandulenko cf3a452b32 JANITORIAL: Whitespace fix 2022-12-01 10:32:46 +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 90e8341f67 DIRECTOR: Set next frame time before executing scripts
Previously, frame scripts that called "delay" would have that adjustment
clobbered by Score::update().

Fixes the credits sequence in Nemurenu Yoru no Chiisana Ohanashi.
2022-11-18 16:28:05 +01:00
Scott Percival 9a10fe51d3 DIRECTOR: Provide live channel information for current frame 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 e477106daa DIRECTOR: Update Channel::_movieTime in Score::updateWidgets
Previously this would be updated in
DigitalVideoCastMember::createWidget, which meant it was possible for a
movie to complete without updating _movieTime to the final end position.

Fixes the cupcakes from not stopping animating once the song is finished
in Chop Suey.
2022-10-06 00:05:17 +02:00
Roland van Laar 73cb9378ad DIRECTOR: Fix dereference after null check
Add check on currentSprite because if statement before does a
check if currentSprite exists, meaning currentSprite can be a nullptr.

Fixes COVERITY: 1498653
2022-10-03 15:45:20 +02:00
Roland van Laar f7c88d7ef2 DIRECTOR: Fix dereference after null check
Add check on currentSprite because if statement before does a
check if currentSprite exists, meaning currentSprite can be a nullptr.

Fixes COVERITY: 1487084
2022-09-26 11:58:40 +02:00
Roland van Laar 3f2744d99f DIRECTOR: Fix resource leak coverity #1430023
Fix Resource leak when running with debugflag `screenshot`.
2022-09-21 10:02:07 +02:00
Scott Percival 3d9cf67233 DIRECTOR: Implement frame and nextframe debugger commands 2022-09-20 20:17:06 +02:00
Scott Percival 7e412f1278 DIRECTOR: Use default palette in Score::startPlay()
Switching to a new movie should force a switch to the default palette if
required, and not assume the palette in use is correct.

Fixes the palette tinting after being reincarnated in Eastern Mind.
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 671d3116ea DIRECTOR: Add palette shifting code for transitions
Fixes transitions in Lost Mind of Dr. Brain demo.
2022-09-12 15:52:18 +02:00
Scott Percival 0e847c42bd DIRECTOR: LINGO: Limit sound updates in b_updateStage()
Previously it was possible for a Lingo script to stop a score sound channel,
then call updateStage, which would immediately start it again. To fix
this, updateStage() will now only update puppet sounds.

Fixes the sound playback when going from the map to the exit screen in
Chop Suey.
2022-09-12 15:52:18 +02:00
Donovan Watteau bf5e489567 JANITORIAL: Fix "to to" and "if if" typos in some comments 2022-09-11 17:45:25 +02:00
Pragyansh Chaturvedi 1a5603c488 DIRECTOR: LINGO: Remove all occurences of _loadedCast outside of the Cast namespace 2022-07-13 18:10:49 +02:00
djsrv d7f9e3601e DIRECTOR: Simplify redraw logic for kTheRegPoint
We only need to add dirty rects for the sprites with this cast member,
not force redraw every sprite.
2022-07-09 18:22:50 -05:00
Eugene Sandulenko eff425e399 JANITORIAL: Remove leftover debug output 2022-06-28 17:33:42 +02:00
Eugene Sandulenko 9fda5bb434 DIRECTOR: Fix crash for movies without score, e.g. Shared Cast 2022-06-28 17:32:39 +02:00
Pragyansh Chaturvedi (r41k0u) 7f0d69367b DIRECTOR: Fix Palette loading wrong Palette index 2022-06-12 15:20:49 +02:00
Eugene Sandulenko e52e41f98b DIRECTOR: Improve debug output for bad channel references 2022-06-06 12:23:00 +02:00
Pragyansh Chaturvedi (r41k0u) 3610df85c6 DIRECTOR: Implement erase lingo command 2022-03-26 22:58:55 +01:00
Eugene Sandulenko 37c7430864 JANITORIAL: Remove trailing whitespaces 2022-03-15 21:05:51 +01:00
eientei95 bf0397654f DIRECTOR: Decode score scripts using regional encoding 2022-02-08 21:36:44 +01:00
Roland van Laar eaa602bb3d DIRECTOR: LINGO: store comments from frame labels
In Director only the first line of a label is seen as the frame label.
The other lines are treated as comments.

The label comment is now shown with debugging ouput.
2022-01-20 23:59:17 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Misty De Meo 1e9ecf405e DIRECTOR: allocate more than 2 audio channels 2021-11-19 22:58:59 -05:00
Orgad Shaneh 02cfffcb67 DIRECTOR: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
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 690562b1b1 DIRECTOR: Use separate queues for user and non-user events
We don't want to immediately process user events when processing another
non-user event.
Fixes https://trello.com/c/wtRV31SE/451-journeyman-execution-order
2021-08-17 21:16:52 -04:00
ysj1173886760 98b5adc4cc DIRECTOR: fix memory leak when using win cursor. 2021-08-17 08:56:13 +08:00
ysj1173886760 2472c763be DIRECTOR: try to load custom cursor from exe file in win platform. 2021-08-16 08:41:36 +08:00
ysj1173886760 267d8b8e44 DIRECTOR: set mac system palette if lastPalette is 0 after disabling puppetPalette. 2021-08-14 21:42:53 +08:00
ysj1173886760 000efc160d DIRECTOR: update video time when render sprites. 2021-08-13 18:03:19 +08:00
djsrv 6abbdf4384 DIRECTOR: Decode labels 2021-08-12 17:25:16 -04:00
djsrv 0b7ee978e2 DIRECTOR: Update cursor before new movie transition 2021-08-11 16:31:50 -04:00
djsrv 57afb36f24 DIRECTOR: Set cursor to watch when switching movie 2021-08-11 16:31:50 -04:00
djsrv 1493ca291b DIRECTOR: Improve empty sound channel behavior 2021-08-07 13:20:23 -04:00
djsrv 02aace0598 DIRECTOR: Use ':' as directory separator 2021-08-07 10:44:37 +02:00
djsrv bae70bf784 DIRECTOR: Fix where timeout events are handled 2021-08-06 11:09:50 -04:00
djsrv 421c8471ad DIRECTOR: Always playSoundChannel in renderFrame 2021-08-06 01:12:04 -04:00