Commit Graph
121 Commits
Author SHA1 Message Date
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
ysj1173886760 67f20656b5 DIRECTOR: use highest bit of _inkData of sprite to decide whether to scale bitmap castmember 2021-07-08 10:08:22 +08:00
ysj1173886760 4ba52620e5 DIRECTOR: delete creating quick matte. 2021-07-08 02:25:11 +02:00
ysj1173886760 d92c06617b DIRECTOR: fixing createQDMatte 2021-07-08 02:25:11 +02:00
ysj1173886760 b152fc82aa DIRECTOR: amend setting sprites dims. 2021-07-08 02:25:11 +02:00
ysj1173886760 6c8d4f3367 DIRECTOR: force to modify sprite dims when we are setting cast though lingo 2021-07-08 02:25:11 +02:00
ysj1173886760 d8d43958e8 DIRECTOR: use initialRect for sprite dims when ink type is copy 2021-07-08 02:25:11 +02:00
ysj1173886760 13f5460ca4 DIRECTOR: only use the original sprites when we have to scale down the bitmap cast member 2021-07-08 02:25:11 +02:00
ysj1173886760 d53064f948 DIRECTOR: amend setting dims for bitmap cast member 2021-07-08 02:25:11 +02:00
ysj1173886760 f9de2bad63 DIRECTOR: use channel's original dims instread of initialRect for bitmap castmember 2021-07-08 02:25:11 +02:00
djsrv 615995fdc1 DIRECTOR: Change member refs to use CastMemberID 2021-06-30 22:32:19 -04:00
ysj1173886760 bcd33eeba3 DIRECTOR: fix rendering text to suit for different style text 2021-06-30 16:29:00 +02:00
ysj1173886760 be199c07ab DIRECTOR: more precise definition for shouldHilite for D3 2021-06-30 16:29:00 +02:00
ysj1173886760 1d20fa758f DIRECTOR: don't hilite puppet sprites. 2021-06-30 16:29:00 +02:00
ysj1173886760 d46866f893 DIRECTOR: implement matte for quick draw shape 2021-06-30 16:29:00 +02:00
ysj1173886760 f097abea02 DIRECTOR: use initialRect to represent sprite dimensions 2021-06-26 16:08:20 +02:00
ysj1173886760 7902d910db DIRECTOR: amend the version check in events and hilite check. add warning for readability 2021-06-20 14:33:53 +02:00
ysj1173886760 01b8afddf5 DIRECTOR: deal with the size of TextCastMember specially. 2021-06-20 14:33:53 +02:00
ysj1173886760 7b99bc7404 DIRECTOR: use inkTypeMatte to check whether hilite or not in D4, which is the same as D3 2021-06-20 14:33:53 +02:00
ysj1173886760 4b28dacaab DIRECTOR: add special check for irregualr button in apartment for drawing hilite 2021-06-20 14:33:53 +02:00
ysj1173886760 31098bbb16 DIRECTOR: modify event handling, introduce _currentHiliteChannelId and _currentHandlingChannelId to movie.
those two are aimed for the situation that when we hold the button and move out of the bounds, then we should de-activated the sprite
_currentHilite are for Bitmap castmember inverting. _currentHandling is for other castmembers, such as macbutton which has it's own check. And also for those sprites which don't need to hilited
2021-06-20 14:33:53 +02:00
djsrv fbbe79e048 DIRECTOR: Don't hilite moveable sprites in D4 2021-06-07 10:34:13 -04:00
djsrv 1b3501af94 DIRECTOR: Autohilite matte sprites in D3 2021-06-04 19:17:59 -04:00
djsrv a58cb03c1c DIRECTOR: Improve autohilite behavior
In D3 or higher, there's an autohilite flag in the cast info.
In D2, sprites seem to autohilite only if they have matte ink.
2021-06-04 17:51:25 -04:00