Commit Graph
144 Commits
Author SHA1 Message Date
Eugene Sandulenko 77834dd43c DIRECTOR: Fix initial rect on DigitalVideo
trektech has set the receiving rect to 1x1 while in reality the
dimensions are taken from the video.

This fixes the ship object movie
2025-03-02 22:29:48 +01:00
Le Philousophe 2a37e2b808 GRAPHICS: MACGUI: Implement drawing primitives
This makes the code comply with the latest API changes.
The drawing calls now need to be optimized for the complex shapes.
2025-01-24 12:11:17 +01:00
antoniou79 83aeb75d5a DIRECTOR: Fix argument order for setting debug channels
In a few occasions the debug channel and debug level arguments were swapped
2024-07-08 12:44:40 +02:00
Scott Percival 41cea48a9e DIRECTOR: Reset sprite contents when loading frames from start
Fixes _blendAmount state leak in w_tonnel of Eastern Mind (activate the
magatama dragon, then look at the creature embedded in the wall).
2024-05-25 16:25:18 +02:00
Scott Percival 2ff3357dac DIRECTOR: Refactor Channel to remove overlay position/dimensions
The original logic doesn't hold up to testing. The position/width/height
of a sprite can be changed at any time without any extra flags; although
the screen needs to be redrawn before you can see any change.

The main thing that the sprite puppet flag does is determine if sprites
are updated from the score data when the frame changes.

Fixes the broken mouse cursor tracking sprite in Chop Suey.

Fixes the sprite scaling in the Doc Martens minigame in Virtual
Nightclub.

Fixes director-tests/D4-unit/T_SPRT01.DIR
2024-05-18 13:56:01 +02:00
Scott Percival 74efd8e6ea DIRECTOR: Fixes based on review feedback 2024-05-12 22:00:19 +02:00
Scott Percival d1a739fbce DIRECTOR: Fix scaling of sprites in score frames
Sprites in a score frame have a width and a height; it appears these
values are only to be used if the "stretch" flag is set. Otherwise, the
cast dimensions are used.

Fixes the scaling when picking up the photo album from the filing
cabinet in P.A.W.S.
2024-05-12 22:00:19 +02:00
Eugene Sandulenko 8287ac9ddc DIRECTOR: Convert Sprite::_trails and Sprite::_stretch into bool 2024-04-29 00:12:24 +02:00
Scott Percival f92f78ef9a DIRECTOR: Fix Sprite::checkSpriteType for film loops 2024-04-25 00:54:17 +02:00
Scott Percival df1dbd33be DIRECTOR: Always resize bitmap Sprite when setting cast member
Fixes body part drawers in Gahan Wilson's The Ultimate Haunted
House.

Fixes inventory screen frame in Hell Cab.
2024-04-25 00:54:17 +02:00
Scott Percival 0377f34e8e DIRECTOR: Revert multiple filmloop support
This reverts commit 21c08536e9.

Unfortunately most of the animations in Eastern Mind stopped working, we
need a rethink of how we do this.
2024-02-28 22:02:55 +08:00
kartiksharmakk 21c08536e9 DIRECTOR: Manage filmloop composed of other filmloops.
This patch adds support for filmloops composed of other filmloops.
It also fixes a bug in the filmloop bbox computation during Sprite::setCast() , we have to create a case kCastFilmLoop to prevent it from going to default case as the default case equates it to dims which is initialrect (0 value) , so the setCast function basically made film loop bbox 0.

Steps to reproduce:

Run the command: ./scummvm --start-movie="ATD\HD\ccTWRRAD.DXR" totaldistortion-win.
After running the command, the fish will now be visible. Previously, it was not being displayed due to lack of nested film loop support.
2024-02-12 11:06:00 +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
Harishankar Kumar 6d4544c13c DIRECTOR: Fix black patches in meet-media band
It has been observed that for `Shape` cast members, the default color
is white, as there were no foreColor in frames data for white fore-color
casts. This indicates  how director saves more memory by omitting this
foreColor(255).

`mediaband-win` used several of transparent white rectangle shape
cast to identify hover and click events. Using lingo `rollOver` command
However these shapes were set foreColor white which was not being
embedded in frames data. This caused the shapes to be rendered black
which is default foreColor.

--start-movie="intro.dxr" mediaband-win
2023-07-26 23:37:12 +02:00
Harishankar Kumar 7b6b6a5541 DIRECTOR: Refactor checks inside setAutoPuppet function
To make code cleaner and avoid duplication of code, moved the checks
inside setAutoPuppet function.
2023-07-19 14:57:59 +02:00
Harishankar Kumar e01bb235f7 DIRECTOR: Support individual auto-puppet sprites properties
According to "Director in a Nutshell, page 15", autoPuppet unlike
puppet is not a single property, instead it is individual for each
sprite property, ie we can have auto-puppet locH of sprite, but
other properties are not auto-puppet.

This change adds support for individual auto-puppet properties.
2023-07-19 14:57:59 +02:00
Harishankar Kumar 5a5e205e0d DIRECTOR: Add _autoPuppet flag, initial work for D6 auto-puppeting
[Based on Director in a Nutshell, page 15]
The following properties of a sprite are auto-puppeted whenever
the property is set: backColor, blend, editable, foreColor, height,
ink, loc, locH, locV, member, moveable, rect and width. Auto-puppeting
of individual properties has no effect on the puppet of sprite property

['Lingo Dictionary' 601 Fixes]
Sprites now have a duration as specified in the (new) score view.
When lingo modifies any of the sprite properties that property
will be auto-puppeted, i.e. the value set will stick for the
duration of that sprite despite any values recorded in the score.
This can cause existing lingo which relied on setting the property
of a sprite without the use of 'puppet' to behave differently.
Calling 'puppetSprite spriteNumber, FALSE' will also clear any
currently auto-puppeted properties.
2023-06-10 16:18:34 +02:00
Scott Percival bcb502d634 DIRECTOR: Move getRegistrationOffset and getBbox to CastMember 2023-05-28 14:44:09 +02:00
Scott Percival f703ee6ecf DIRECTOR: Split CastMember classes into files 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 82e891d1d3 DIRECTOR: Move palette/transition debugging to images flag 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 59fbdf7558 DIRECTOR: Don't override sprite parameters for shapes
Fixes various blue rectangles in Eastern Mind and Total Distortion.
2022-09-12 15:52:18 +02:00
Scott Percival 830cf1cacd DIRECTOR: Only use kCastMemberSprite when cast member exists
The default sprite type for an empty channel in Director is kInactiveSprite;
make sure this is used as some scripts depend on it.

Fixes being unable to summon the drum in Eastern Mind.
2022-08-28 10:31:00 +00:00
Eugene Sandulenko dbb1114269 DIRECTOR: Switch to wider rect primitives so visuals stay unchanged 2022-07-13 23:22:35 +02:00
Pragyansh Chaturvedi (r41k0u) c9b9544fcd DIRECTOR: Prevent changing of spriteType for QDShapes 2022-07-09 22:14:43 +02:00
Pragyansh Chaturvedi 42dfdd9f35 DIRECTOR: LINGO: Implement constraint in Channel::getBbox(), Fix getActive() to return true for movable sprites 2022-06-26 22:53:08 -05:00
Eugene Sandulenko 671db8b3c0 DIRECTOR: Use Pattern Tiles for pattens #57-64 2022-06-15 18:23:06 +02:00
Eugene Sandulenko b7735a6326 DIRECTOR: Encapsulated tile access and implement override by VWTL 2022-06-15 01:01:05 +02:00
Pragyansh Chaturvedi (r41k0u) 3610df85c6 DIRECTOR: Implement erase lingo command 2022-03-26 22:58:55 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Scott Percival 2e77b6eaf6 DIRECTOR: Fix position of film loop subchannels
Sprites stored in frames are referenced by position (minus the
registration offset), width and height. Film loops are the same. As
such, fix the bounding box calculation for the film loop to use the
correct sprite positions (e.g. center for bitmaps), then fix the
subchannel generator to take these into account.
2021-11-09 21:46:44 +08:00
Le Philousophe 353d2f0220 DIRECTOR: Fix compilation with C++98
The default assignment constructor just copies data over and we could
end up with _matte pointing twice to the same surface. It's now properly
reseted.
2021-10-21 11:51:25 +02:00
Scott Percival 47c5b37067 DIRECTOR: Fix use-after-free in Sprite 2021-10-12 01:08:34 +08:00
Scott Percival e4f767c916 DIRECTOR: Move methods from Channel to Sprite 2021-10-12 01:08:34 +08:00
Scott Percival 0efc7139a9 DIRECTOR: Refactor FilmLoopCastMember to use Sprite 2021-10-12 01:08:34 +08:00
djsrv 1a0393bc19 DIRECTOR: Consider buttons to respond to mouse
Even without scripts, respondsToMouse and isActive should treat
buttons as if they have scripts since they change visually.
2021-08-23 16:10:44 -04:00
ysj1173886760 c4fac4e2b7 DIRECTOR: move warnings to deeper debug levels. 2021-08-20 19:21:28 +08:00
ysj1173886760 8e8f640e69 DIRECTOR: fix editableText both in D2/3 and in D4. 2021-08-18 20:19:18 +08:00
ysj1173886760 1325c02252 DIRECTOR: store the original size for stretched sprite 2021-08-08 17:18:59 +08:00
ysj1173886760 1dfd722735 DIRECTOR: supporting inverting QDShape 2021-08-03 16:14:50 +08:00
ysj1173886760 6d2131801f DIRECTOR: use sprite type to guide creating widget, instead of overwrite cast type 2021-07-19 10:41:22 +08:00
ysj1173886760 8c58acc8d8 DIRECTOR: don't render if sprite type is conflict with cast type, instead of override cast type 2021-07-19 10:41:22 +08:00
djsrv 9dfce6ec11 DIRECTOR: Add FIXME comments to Sprite::setCast 2021-07-16 23:19:05 -04:00
djsrv 307bf94beb DIRECTOR: Improve Sprite::setCast behavior 2021-07-16 23:19:05 -04:00
ysj1173886760 c7dd7d6a3f DIRECTOR: set castmember to null when sprite is bitmap sprite and sprite type doesn't match cast type 2021-07-14 18:00:49 +08:00
djsrv 22cb3a4d40 DIRECTOR: Reorder autohilite logic
These checks apparently need to be done in a specific order. If in D3 no
cast info is found, the auto hilite check cannot be performed, so it
falls back to the matte check.
2021-07-11 02:04:25 -04:00
ysj1173886760 c31abdc0d7 DIRECTOR: amend version check in shouldHilite in sprite 2021-07-11 10:49:01 +08:00
ysj1173886760 ee52e2274c DIRECTOR: eliminate forcing dims when setting cast in lingo 2021-07-08 10:10:07 +08:00