Commit Graph

4904 Commits

Author SHA1 Message Date
Harishankar Kumar
608beef745 DIRECTOR: Fix memory leak due to bad flag
ProjectorArchive was giving memory leak and build failures due to not deleting unwrapped stream after use
2023-05-29 19:36:15 +02:00
Harishankar Kumar
9955c95806 DIRECTOR: Add multiple resources in exe using ProjectorArchive
This patch uses ProjectorArchive to extract multiple resources embedded into executable files, additionally a new function getRawExe is defined which gets raw exe file name without --start-movie overriding it.
Solves the problem for finding multiple resource files like `ModTB.DXR` in 'mcluhan', uses 'mcluhan.exe' to extract resources and add them to SearchMan.
2023-05-29 19:36:15 +02:00
Scott Percival
4bf4e4a4a0 DIRECTOR: Fixes based on feedback 2023-05-28 14:44:09 +02:00
Scott Percival
cf886b17e7 DIRECTOR: Fix regression in sprite dragging
Sprites with the movable attribute set do not need to be a puppet.
2023-05-28 14:44:09 +02:00
Scott Percival
4090a22782 DIRECTOR: Fix divide by zero 2023-05-28 14:44:09 +02:00
Scott Percival
96c33ca4e8 DIRECTOR: Fix D5 palette fade times 2023-05-28 14:44:09 +02:00
Scott Percival
9ec6722b6a DIRECTOR: Remove inkBlitStretchSurface()
No longer needed, the scaling should happen when updating the widget.

Fixes adjusting sprites with Lingo, such as in DEVO Presents:
Adventures of the Smart Patrol.
2023-05-28 14:44:09 +02:00
Scott Percival
bcb502d634 DIRECTOR: Move getRegistrationOffset and getBbox to CastMember 2023-05-28 14:44:09 +02:00
Scott Percival
9188159114 DIRECTOR: Move draw debugger to Window::render() 2023-05-28 14:44:09 +02:00
Scott Percival
4a85392dd9 DIRECTOR: Skip palette fades when the source and destination match
Fixes menu interactions in The Cute machine.
2023-05-28 14:44:09 +02:00
Harishankar Kumar
76d1590ccc GRAPHICS: Implement smartmenu for macpopups
Smartmenu implementation using offsetY to displace popup such that the previous selected item will fall onto cursor, includes checked item and highlighted.

For `Popup Menu` in theapartment, without this patch the second popmenu was not remembering the last selected item and was opening it from scratch, after this patch popupmenu will open from the last selected item already selected with checkbox.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
8aa6ed2110 DIRECTOR: Implement popupmenuxobj for macpopmenu
Implements xlib methods for popupmenu creation/item selection, uses macpopmenu internally.

Used for implementing 'Popup Menu'  in theapartment, with this popupmenu are working.
2023-05-28 13:50:18 +02:00
Eugene Sandulenko
e683f9e8d3
DIRECTOR: Fix text rendering test colors 2023-05-28 12:54:06 +02:00
Misty De Meo
d90a045449
DIRECTOR: add ganbareinuchan2 win 2023-05-24 13:28:03 -07:00
D G Turner
d5eea395bb DIRECTOR: Restore Redundant Declaration Warning Fix in Grammar Parser Code
This is emitted by GCC if -Wredundant-decls is passed.

The Bison source files to generate this header should be modified to
fix this, but I am unclear on the required workflow.
2023-05-21 11:45:27 +01:00
Walter Agazzi
58e1e4dab8 DIRECTOR: Add detection entries for some german titles
From TRAC reports
2023-05-20 00:03:30 +02:00
Misty De Meo
25ebcb974b DIRECTOR: .exe is a valid movie ext
Fixes Mylk (Win), which tries to return to the main screen by opening
mylk.exe via a call to open the movie "MYLK".
2023-05-18 22:07:43 -07:00
Eugene Sandulenko
2321decd30
DIRECTOR: Persist immeidate sprite flag when copying channels
Lingo `set the immediate of sprite` is getting lost when we copy over
the sprites to the channels. Now we inherit this setting in the copy.

Fixes 'PopUp Menu' in theapartment: without this fix we are losing the
interactivity as soon as we select a pop-up menu item once.
2023-05-17 23:14:07 +02:00
eientei
68939befcb DIRECTOR: cp1250 -> cp1252 in order table comments 2023-05-17 20:36:10 +02:00
eientei
04153f915a DIRECTOR: Add order tables for D8.5+ (Win) and D8.5 (Mac) 2023-05-17 20:36:10 +02:00
Misty De Meo
9682e66702
DIRECTOR: add journey2source patch 2023-05-17 09:23:21 -07:00
Donovan Watteau
f5a505782f DIRECTOR: Fix -Wformat warning 2023-05-14 22:57:11 +02:00
Scott Percival
da06ecad9b DIRECTOR: Move _lastPalette to DirectorEngine
If the destination movie uses a palette cast member in the same location
as the source, but with different data; Director will assume that the old
palette is correct right up until it has to switch to something else via
the score.

Additionally, ensure that all palettes are loaded into the index when
the Cast is loaded, not just single ones that haven't been loaded before.

Fixes movie transitions and palette rendering in Phibos: Following the Comet.
2023-05-14 14:10:22 +02:00
Misty De Meo
d0e7006fd2
DIRECTOR: two new games 2023-05-13 22:04:19 -07:00
Eugene Sandulenko
a98ecfba0a
DIRECTOR: LINGO: Read 64-bit constants
Used in D5+ particularly in safecracker
2023-05-13 18:18:53 +02:00
Eugene Sandulenko
62ff4ddb4c
DIRECTOR: LINGO: Improved debug output on float constants loading 2023-05-13 17:39:06 +02:00
Eugene Sandulenko
d0b5529e15
DIRECTOR: Added stub for parent scripts 2023-05-13 17:38:00 +02:00
Eugene Sandulenko
1ff6b25465
DIRECTOR: LINGO: Implement "the number of castlibs" 2023-05-13 15:57:48 +02:00
Eugene Sandulenko
57b57ec7a1
DIRECTOR: LINGO: Implement "the number of xtras" 2023-05-13 15:42:09 +02:00
Vladimir Serbinenko
18d740fedd DIRECTOR: Redo "Fix use-after-free"
This reverts commit 036297b605.
Then it solves the same problem in a way that is more compliant
with how similar code is written in this engine thus avioding
accidentally introduced memory leak.
2023-05-12 00:11:58 +02:00
Eugene Sandulenko
c66b66664b
DIRECTOR: Force all transitions to single step in fast mode 2023-05-10 23:32:24 +02:00
Scott Percival
a379602443 DIRECTOR: Hide null calls to Movie::getScriptContext() 2023-05-10 22:32:21 +02:00
Scott Percival
e49e64345b DIRECTOR: Make BitmapCastMember::_bitsPerPixel a uint8
Fixes several bitmaps in The Cute machine.
2023-05-10 22:32:21 +02:00
Scott Percival
3b5500227a DIRECTOR: Update the current sound fade during a palette transition
Fixes the intro music fading in The Cute machine.
2023-05-10 22:32:21 +02:00
Scott Percival
e0c7bec488 DIRECTOR: Fade sounds if the channel handle exists
isChannelActive() excludes looping sounds, which are allowed to
be faded in or out.

Fixes the intro music fading in The Cute machine.
2023-05-10 22:32:21 +02:00
Scott Percival
343a177016 DIRECTOR: Add new lookup table for D5 palette fade times
When fading a palette, Director lets you pick a "frame rate" between 1
and 30. These each correspond to a fixed transition time, with the
higher framerates converging to zero.

In D4 and under the slowest of these frame rates is half a second.
After some user feedback they changed this in D5 to be a range
of times, ranging from a leisurely 16.5 seconds all the way to
instantaneous.

Fixes the intro fade in The Cute machine.
2023-05-10 22:32:21 +02:00
Scott Percival
2065a7d39c DIRECTOR: Fix D5 looping sound support
Fixes the intro fadeout of The Cute machine.
2023-05-10 22:32:21 +02:00
Scott Percival
401a17d35a DIRECTOR: Add dynamic sound channel allocation
By D5, titles are allowed to play back sounds on an arbitrary channel
and the mixer deals with it. This apparently works to an extent on Mac
for D4 and below, whereas Windows D4 has a hard limit of 4 channels.

As the clear intent is to play something, we should do that for all
versions, unless a counterexample shows up.

Used by Smarty.
2023-05-10 22:32:21 +02:00
Scott Percival
093fbae86c DIRECTOR: Add detection entry for "The Cute machine" 2023-05-10 22:32:21 +02:00
Vladimir Serbinenko
36f3797f02 DIRECTOR: Accept DRCF as config instead if VWCF 2023-05-10 09:53:36 +02:00
Vladimir Serbinenko
b8207b5f08 DIRECTOR: Ignore Xtra files 2023-05-10 09:53:36 +02:00
Vladimir Serbinenko
036297b605 DIRECTOR: Fix use-after-free 2023-05-10 09:53:36 +02:00
Scott Percival
8976c4f56b DIRECTOR: Fix parse bug in loadCastlibMapping 2023-05-10 09:48:50 +02:00
Scott Percival
919b7ff5b1 DIRECTOR: Show multiple casts in debugger 2023-05-10 09:48:50 +02:00
Scott Percival
5426729bf4 DIRECTOR: Fix zoom transitions 2023-05-10 09:48:50 +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
8a990d556c DIRECTOR: Add Transition cast member type 2023-05-10 09:48:50 +02:00
Scott Percival
5c82519e35 DIRECTOR: Add D5 support for sound cast members 2023-05-10 09:48:50 +02:00
Scott Percival
96855f1cf7 DIRECTOR: Add D5 file extensions to pathMakeRelative 2023-05-10 09:48:50 +02:00
Scott Percival
0a3b7ee462 DIRECTOR: Load in external casts and members 2023-05-10 09:48:50 +02:00