Commit Graph

151655 Commits

Author SHA1 Message Date
Filippos Karapetis
40d62bd6bc AGOS: Use true/false keywords for boolean variables 2024-05-13 09:47:28 +03:00
Filippos Karapetis
8bf89f10d6 ULTIMA8: Remove superfluous protected section 2024-05-13 09:47:28 +03:00
Filippos Karapetis
d2bc3aea2f ULTIMA: NUVIE: Remove empty protected sections 2024-05-13 09:47:27 +03:00
Filippos Karapetis
7c7625134b WATCHMAKER: Remove superfluous void in functions with no parameters 2024-05-13 09:47:27 +03:00
Filippos Karapetis
be6399d565 WINTERMUTE: Remove superfluous void in functions with no parameters 2024-05-13 09:47:27 +03:00
Matthew Jimenez
bca1dde768 ULTIMA8: Set EXT_CAMERA on item during camera process.
This flag was sometimes not properly set, preventing fast area updates during main actor teleport.
Fixes #13279
2024-05-12 17:37:51 -05:00
Eugene Sandulenko
6c0864dd81
TESTS: Fix Base64 test 2024-05-12 23:26:20 +02:00
Eugene Sandulenko
e094720b80
BAGEL: Mark engine as dependent on freetype2 2024-05-12 23:19:15 +02:00
Eugene Sandulenko
ca62bd3141
DIRECTOR: Fix Amiga build 2024-05-12 23:14:43 +02:00
Strangerke
ad7a35b2ac BAGEL: Make error detail mandatory 2024-05-12 21:27:15 +01:00
Strangerke
9ae3cfbda4 BAGEL: add error detail in all reportError calls, remove an unused function in CBofFile and in log 2024-05-12 21:18:26 +01:00
Strangerke
5c9874fb02 BAGEL: More work on improving reportError() feedback, more assignments moved out of if statements 2024-05-12 21:18:25 +01:00
Scott Percival
13fa4baf72 DIRECTOR: Split savename prefix into common method 2024-05-12 22:00:19 +02:00
Scott Percival
a1d692963d DIRECTOR: LINGO: Track ScriptContext properties in addition order 2024-05-12 22:00:19 +02:00
Scott Percival
1c07d3e9aa DIRECTOR: Move save modal glue into function 2024-05-12 22:00:19 +02:00
Scott Percival
74efd8e6ea DIRECTOR: Fixes based on review feedback 2024-05-12 22:00:19 +02:00
Scott Percival
428ad1ac18 DIRECTOR: Fix Cursor::readFromCast for D5 2024-05-12 22:00:19 +02:00
Scott Percival
60f1a24c81 DIRECTOR: LINGO: Add support for script objects to some PARRAY methods
In an undocumented use, you can access the property list of a script object
with these.

Fixes the Stella Artois label hunt minigame in Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
5cd47cec38 DIRECTOR: LINGO: Fix Datum collision with b_abs
The output of b_abs shared a refCount handle with the input, so e.g.
updating a variable in-place would result in no change.
2024-05-12 22:00:19 +02:00
Scott Percival
3bcc920a1e DIRECTOR: XOBJ: Have MMovie cache the last drawn frame 2024-05-12 22:00:19 +02:00
Scott Percival
8e84fa687e DIRECTOR: LINGO: Handle arithmetic attempted on cast references
Fixes using the timezone switcher in Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
aa15020b8d DIRECTOR: Refactor mouse event handling
After creating a bunch of tests, it is clear that the choice of what
mouseDown/mouseUp handler in the hierarchy to use is determined just
before running it. This was a problem, as we were caching that
information up-front when processing the input events, and it is
entirely possible for e.g. a mouseDown handler to jump to another frame,
which would affect which subsequent mouseDown/mouseUp handlers to call.

Fixes director-tests/D4-unit/T_EVNT01 to T_EVNT11.
2024-05-12 22:00:19 +02:00
Scott Percival
df0ccad5dc DIRECTOR: Add buffer for injecting input events
Forces UnitTest to wait for the engine's event processing pipeline to
run after injecting events.
2024-05-12 22:00:19 +02:00
Scott Percival
6a0fb37616 DIRECTOR: Allow only one input event to execute at a time
If you trigger e.g. a mouseDown and a mouseUp event, the mouseUp event
should not be run until the mouseDown event has returned.

Fixes director-tests/D4-unit/T_EVNT03.DIR
2024-05-12 22:00:19 +02:00
Scott Percival
e4b90dd234 DIRECTOR: Use mouse coordinates from individual events
Taking coordinates directly from the event manager could introduce
subtle timing problems, and makes it near-impossible to inject fake
events into the pipeline for testing.
2024-05-12 22:00:19 +02:00
Scott Percival
cabbd1288b DIRECTOR: XOBJ: Add new UnitTest methods 2024-05-12 22:00:19 +02:00
Scott Percival
8b2a30dd65 DIRECTOR: Rename Lingo::printSTUBWithArglist 2024-05-12 22:00:19 +02:00
Scott Percival
ce447005da DIRECTOR: XOBJ: MMovie fixes 2024-05-12 22:00:19 +02:00
Scott Percival
f2a23a5e39 DIRECTOR: Add cheat-enabling patch for Virtual Nightclub 2024-05-12 22:00:19 +02:00
Scott Percival
785fb478b6 DIRECTOR: Fix null pointer in BitmapCastMember 2024-05-12 22:00:19 +02:00
Scott Percival
10ac6b61d8 DIRECTOR: LINGO: Add guardrail for implicit factory calls
It is possible to have a script which looks like a factory,
but has normal functions in it also. Calling those normal functions
should not apply the bodge which injects the me object as argument 1.
2024-05-12 22:00:19 +02:00
Scott Percival
64cc8adb3c DIRECTOR: LINGO: Allow b_length(VOID) 2024-05-12 22:00:19 +02:00
Scott Percival
1bb44c5241 DIRECTOR: Add locH and locV property support for POINT 2024-05-12 22:00:19 +02:00
Scott Percival
32f3cd0633 DIRECTOR: Add more debugging to FilmLoopCastMember 2024-05-12 22:00:19 +02:00
Scott Percival
a08934a95e DIRECTOR: Update current frame before running startMovie
The startMovie handler needs "the frame" to return the starting frame,
which isn't necessarily 1. Easiest way to fix this is to set up the
frame data in the Score::startPlay() handler.

Fixes the broken navigation in the Empire State Building in Hell Cab.
2024-05-12 22:00:19 +02:00
Scott Percival
ed4d4e355b DIRECTOR: Fix absolute paths in linked cast members
Fixes listening to the radio in the hotel in GADGET: Invention, Travel
and Adventure.
2024-05-12 22:00:19 +02:00
Scott Percival
51b7d37e70 DIRECTOR: Fix kTheDuration of DigitalVideoCastMember
Fixes the aerodog introductory cutscene in P.A.W.S.
2024-05-12 22:00:19 +02:00
Scott Percival
0bbed1793e COMMON: Silence FSDirectory::createReadStreamForMemberAltStream warning
Components such as Common::MacResManager call this method to check if an
alternate stream exists; a null response is valid, so move this to the
debug log.
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
Scott Percival
5cacbd49e3 DIRECTOR: Fix Frame::readSprite debug messages 2024-05-12 22:00:19 +02:00
Scott Percival
d7461b2f48 DIRECTOR: LINGO: Fix array eq/neq comparison bugs 2024-05-12 22:00:19 +02:00
Scott Percival
e0242d8d6a DIRECTOR: Make b_random return 16-bit numbers 2024-05-12 22:00:19 +02:00
Scott Percival
e28f30d680 DIRECTOR: XOBJ: Add readFile/writeFile stubs to MMovie 2024-05-12 22:00:19 +02:00
Scott Percival
61d0603304 DIRECTOR: Duplicate cast member fixes
Cast bounding boxes are now copied, and duplicates of shared cast
members are kept in the (cross-movie) shared cast.

Fixes displaying the inventory bar in Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
45c9abff93 DIRECTOR: Refactor Channel::getMask()
The Mask ink type allows Director to combine a sprite with a 1bpp
mask bitmap to stencil an image. Previously we were using the widget
drawing code to generate this image, which caused issues with scaling
and depth (as the surface was formatted to match the screen). The new
code checks for a 1bpp image specifically and sends it through, removing
the workarounds for screen depth.

Fixes the drawing of the welcome cube at the start of Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
9ac91fc68c DIRECTOR: XOBJ: Fix UnitTest calling convention to match DLL 2024-05-12 22:00:19 +02:00
Scott Percival
f8210d9b58 DIRECTOR: Fix cast member name cache
In Director you can have multiple cast members with the same name.
Looking up a cast member by name should always return the first member
ID; we don't necessarily load the cast members in order, so we need
to verify this. Also any cast manipulation actions should update or
refresh the name cache.

Fixes the bitmaps chosen for the welcome cube at the start of Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
ec56a7c2fe DIRECTOR: Fix kTheCursor output after Cursor::readFromCast 2024-05-12 22:00:19 +02:00
Scott Percival
7f6a4d80ca DIRECTOR: XOBJ: Add first pass at video mixer to MMovie
Makes initial cutscenes playable in Virtual Nightclub.
2024-05-12 22:00:19 +02:00
Scott Percival
4958eef30a DIRECTOR: XOBJ: Fix typo in InstObj 2024-05-12 22:00:19 +02:00