Commit Graph

4950 Commits

Author SHA1 Message Date
Eugene Sandulenko
96c36bb004
DIRECTOR: Remove VWtc/VWtk warnings. These chunks are not used 2023-06-12 15:49:45 +02:00
Eugene Sandulenko
7dff783c74
DIRECTOR: Skip more unused chunks 2023-06-12 15:49:44 +02:00
Misty De Meo
dbda3574cc
DIRECTOR: add second movutils name, method
This is loaded as `MovieUtilities` in Momi no Ki no Shita de, which
also makes use of the getSystemPath method.

Other methods not implemented since they're not used on this disc.
2023-06-11 17:25:22 -07:00
Eugene Sandulenko
aed4c89b13
DIRECTOR: Print out list of unprocessed chunks in Director files 2023-06-11 23:24:47 +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
Harishankar Kumar
bcd4a82075 DIRECTOR: remove puppet checks when setting sprite properties
In original engine it is possible to set non-puppted sprite properties
like position, backcolor etc and then call updatestage to update the
screen according to property. This is undocumented behaviour
which is not present depicted in any books however with rigorous testing
it is found to be true. This change only persist for the current frame
and once the playback head is moving the change is lost.

`ATD\HD\bdDREAMA.DXR` of 'totaldistortion' used some of this quirk to
display moving bullets.
2023-06-10 16:18:34 +02:00
Misty De Meo
d814ddda90 DIRECTOR: revert changes to openResFile
In 6e47994fc793f122768565185b1d6c6052aca2d9, openResFile was changed
to use the new `openArchive` method. However, that method tries to
treat the file as a Director archive and it may not be. This broke,
for example, loading external cursors via `openResFile`. This reverts
to the previous behaviour.
2023-06-08 22:48:21 -07:00
Eugene Sandulenko
450bd74fad
DIRECTOR: Attempt to fix memory leaks on unsuccessful projector open attempts 2023-06-08 16:08:09 +02:00
Scott Percival
354abe0cc7 DIRECTOR: Fix ProjectorArchive path lookup 2023-06-08 09:16:30 +02:00
Scott Percival
c94f2de321 DIRECTOR: Add font quirks for two Star Trek games 2023-06-08 09:16:30 +02:00
Scott Percival
507a4431a8 DIRECTOR: Fix b_getAt to support POINT 2023-06-08 09:16:30 +02:00
Scott Percival
07608d13ec DIRECTOR: Add stub for Color XObj 2023-06-08 09:16:30 +02:00
Scott Percival
9b29fff76c DIRECTOR: Make b_sort behaviour more accurate
Fixes the constants init loading section of Star Trek TNG
Episode Guide.
2023-06-08 09:16:30 +02:00
Scott Percival
993c473bb6 DIRECTOR: b_objectp should return 1 for ARRAY and PARRAY
Fixes the constants init loading section of Star Trek TNG
Episode Guide.
2023-06-08 09:16:30 +02:00
Scott Percival
14474ce129 DIRECTOR: Fix "the number of castMembers"
This figure is supposed to be the highest member ID for a cast member in
the current movie, not the actual count of cast members.

In addition, Lingo only throws an error when querying cast member IDs that
are higher than this figure. If the member ID is lower and the cast
member doesn't exist, "the" queries return a VOID.

Fixes the verify cast table check in Star Trek TNG Episode Guide.
2023-06-08 09:16:30 +02:00
Scott Percival
871c1d0907 DIRECTOR: Fix leak in Window::runTests() 2023-06-08 09:16:30 +02:00
Scott Percival
dcd897e5c6 DIRECTOR: Add Object::incRefCount() and Object::decRefCount() helpers 2023-06-08 09:16:30 +02:00
Scott Percival
458e97933d DIRECTOR: Refactor archive loading code
Make DirectorEngine::_allOpenResFiles the de-facto owner of Archive *
objects, move all of the various loadEXE/loadMac methods off Window and
onto DirectorEngine, and replace inline Archive loading with
openArchive().
2023-06-08 09:16:30 +02:00
Misty De Meo
7c13c3ce51
DIRECTOR: Windows paths can begin with @ 2023-06-07 16:39:14 -07:00
Harishankar Kumar
ac3e2eab27 DIRECTOR: Enable mAtFrame hook for future director versions
Starting D4, actorList is implemented and all the documentation
points to the use of it, however with testing it has been found
that the support for mAtFrame is never removed, both of these
can be used in parallel, hence adding support for mAtFrame hook
in future director versions.

`Hierarchical Bird` of 'theapartment4' which is built for director 4
uses legacy mAtFrame hook.
2023-06-08 01:21:09 +02:00
Misty De Meo
828454416f
DIRECTOR: add full mominoki 2023-06-07 09:27:51 -07:00
Eugene Sandulenko
69a372672e
DIRECTOR: Properly set volume on starting sound. Store sound volume defaults. 2023-06-06 19:43:32 +02:00
Eugene Sandulenko
aacb0cac11
Revert "DIRECTOR: Report inactive channel volume as 0"
This reverts commit 72d890b751.

This brought a regression of turning sound in many games.

It breaks again the7colors when exiting the car:

  --start-movie=03CAR:xn--Car.IO-ma28a:CarOutSideView03
2023-06-05 20:05:34 +02:00
Eugene Sandulenko
a1f40090ca
DIRECTOR: LINGO: Rerender sprite on changed bbox 2023-06-03 09:43:43 +02:00
Eugene Sandulenko
ba047bd1cc
DIRECTOR: LINGO: Fix potential crash 2023-06-03 09:43:43 +02:00
Eugene Sandulenko
c0e198c8f8
DIRECTOR: Avoid crashing on empty filenames in detection 2023-06-03 00:12:10 +02:00
Eugene Sandulenko
ef6a7b7daf
DIRECTOR: Setting sprite box is allowed for stretched sprites, and add sanity checks
This fixed picking animals in zoo in the7colors. --start-movie=06DEPTSTORE:7F:DeptP3-06
2023-06-03 00:03:36 +02:00
Eugene Sandulenko
9b9fa9f8ad
DIRECTOR: LINGO: spritebox Lingo command sets sprite stretch to true 2023-06-03 00:03:36 +02:00
Eugene Sandulenko
501ed235e3
DIRECTOR: Return full path for Raw EXE
This fixed mcluhan-win that uses path to .exe as the root for other files
2023-06-02 16:31:29 +02:00
Eugene Sandulenko
dd50ae1089
DIRECTOR: Improve debug output 2023-06-02 14:36:41 +02:00
Eugene Sandulenko
ed56d9c317
DIRECTOR: Sync channel volume during fades 2023-06-01 22:08:36 +02:00
Eugene Sandulenko
1f635b961e
DIRECTOR: Properly return sound volume 2023-06-01 21:58:22 +02:00
Eugene Sandulenko
72d890b751
DIRECTOR: Report inactive channel volume as 0 2023-06-01 21:58:21 +02:00
Eugene Sandulenko
b8c94f3a45
DIRECTOR: Added missing override keyword 2023-06-01 20:23:30 +02:00
Harishankar Kumar
829c3e32f4 DIRECTOR: Implement modal property of window
Implements modal property using the locking widgets of macwindowmanager.

`modal of window` in 'workshop' uses this.

Co-authored-by: Pragyansh Chaturvedi <pragyanshchaturvedi18@gmail.com>
2023-06-01 20:17:23 +02:00
Harishankar Kumar
dd72dd09ca DIRECTOR: Implement the titleVisible property of window
Modifies border of window by first changing title to "", then updating
window border to borderType 2 `ThinNoTitle`.

`titleVisible of window` to verify this behavior.

Co-authored-by: Pragyansh Chaturvedi <pragyanshchaturvedi18@gmail.com>
2023-06-01 20:17:23 +02:00
Misty De Meo
0c92428a0f DIRECTOR: Cast: search for xlib
The shared cast can contain xlibs. Fixes recognizing the xlib in
Journey to the Source.
2023-06-01 11:37:42 +08:00
Misty De Meo
2ef9ba7d6a
DIRECTOR: add full rolypolys2 2023-05-31 14:47:04 -07:00
Eugene Sandulenko
1b8e614bc8
DIRECTOR: Fix b_offset implementation and make it case-insensitive
It must use Director character order.

This also implemented d_strstr() function as strstr() replacement

The side effect of it is the7colors navigation was broken. It contains
the following code:

  set offs = offset("ROOM.I/O",the pathname) - 1
  set path = chars(the pathname,1,offs)&"01.Colidor:"

the pathname is "01ROOM:Room.I/O:" that does not match "ROOM.I/O"
2023-05-31 23:16:02 +02:00
Harishankar Kumar
6700c810fa DIRECTOR: Get/Set rect property of window, allow dynamic resize/move.
Adds the support to get/set field 'rect' of window object, interally it modifies the inner dimension of window object.

'mcluhan' used this to set window dimensions of background windows (through tell), Additionally `rect of window` in `workshop` also uses this patch for setting/getting field `rect` of window.
2023-05-31 13:29:33 +02:00
Harishankar Kumar
23f1229e67 GRAPHICS: MACGUI: Refactor resize() to extract inner window resizing
resize function is extracted to new function resize and resizeInner,
also a new private function rebuildSurface is created to handle common
code of refreshing/rebuilding surface after modifying inner or outer
window dimensions.
2023-05-31 13:29:33 +02:00
Harishankar Kumar
84b2442fac DIRECTOR: Allow calling/reference to window using index
Initially, window can only handle calls by string parameters, ie `window "abc"`, however a window can also be called using its index in windowList, ex. `window 1`, this patch adds support to check reference type (ie checking using STRING or INT) and return window by index if applicable.

`rect of window` of `workshop` used this feature to create a window named ball then referring to it using `window 1`, previously multiple windows were getting created, however now the existing window will be returned.
2023-05-31 13:29:33 +02:00
Eugene Sandulenko
aff4813a59
DIRECTOR: LINGO: Fix POINT/RECT comparison op 2023-05-30 23:35:36 +02:00
Eugene Sandulenko
85f9e5239e
DIRECTOR: LINGO: Implement Datum::isArray() 2023-05-30 23:29:33 +02:00
Eugene Sandulenko
b60275e104
DIRECTOR: Gracefully process case when there is no startup file specified 2023-05-29 22:21:23 +02:00
Harishankar Kumar
832d7d2f02 DIRECTOR: Change error in case of bad file to warning, to exit gracefully
Initially for a bad file that didn't exist, the ProjectorArchive was throwing up, now however implemented gracefully loading.
Fixed error and termination for `Majestic.bin`, the path it tried to look up was `Majestic` from detection entry.
2023-05-29 19:36:15 +02:00
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