3954 Commits

Author SHA1 Message Date
Roland van Laar
9ebd702a4c DIRECTOR: LINGO: Remove buildbot warnings
The entity STUBS that were encountered on the buildbot are all fixed
now.

This reverts commit a426853acc5b21a269c1fd5f8e697cf55b784f0e.
2022-03-11 23:46:36 +01:00
Roland van Laar
5ce2dffaee DIRECTOR: LINGO: implement updateMovieEnabled
updateMovieEnabled is a boolean. It's a flag to signal that the changes
in the movie need to be saved when branching to another movie.

The variable is implemented but without any side effect.
2022-03-11 23:23:44 +01:00
Roland van Laar
eef834cbf4 DIRECTOR: LINGO: Implement the traceLoad property
The traceLoad property can be 0, 1, 2 or 3. It specifies how much
verbosity is shown when loading cast members.

It's a bt useless for ScummVM. We have our own verbosity mechanism.
Furthermore ScummVM loads all casts up front and unload is a no op.
2022-03-11 23:23:44 +01:00
Roland van Laar
1b2ce997b1 DIRECTOR: LINGO: implement frameScript property
The frameScript property returns the cast number of the script in the
scipt channel.
2022-03-11 22:39:01 +01:00
Roland van Laar
8d22aa3af1 DIRECTOR: LINGO: Implement the actorList property
The actorList is a global array property. Birthed scripts can be added
to it. The `stepFrame` method is called on all objects in the array on
every frame. < D4 had an executePerFrameHook for this.
2022-03-11 21:58:15 +01:00
Roland van Laar
2a1149a453 DIRECTOR: LINGO: Implement property the exitLock
In Director the exitLock prevents quitting the program when it's set to
TRUE. get and set for the exitLock is implemented.

The underlying functionality, preventing exiting a program, is not
implemented. ScummVM should always respond to a QUIT event.
2022-03-11 20:32:54 +01:00
Roland van Laar
c52befe02e JANITORIAL: Code style fixes 2022-03-11 19:44:22 +01:00
Roland van Laar
a426853acc DIRECTOR: LINGO: fail buildbot on STUBBED entities 2022-03-11 00:51:23 +01:00
Roland van Laar
b8aa4aedba JANITORAL: spelling fix 2022-03-11 00:02:50 +01:00
Roland van Laar
3a77a95a6a DIRECTOR: fall back to AVI decoder
AVI video is used in the mckenzie-demo-win game.
2022-03-11 00:02:04 +01:00
Roland van Laar
6cd54ce1d0 DIRECTOR: LINGO: FPLAY: fix name
The FPlay XObjects internal name is FPlay.

Necessary since ScummVM uses the internal XObjects names in rsrc files.
    Commit: 930d9236
2022-03-10 23:42:37 +01:00
Roland van Laar
95fc5560f9 Director: Implement the searchPath
the searchPath is an array that contains paths that need to be searched
when opening a file. It's a property on the same global level in the
same way itemDelimeter is.

The searchPath is set via cb_theassign2. It's used for assigning
properties to the movie itself. `g_lingo` in the case of ScummVM.

The only known case for cb_theassign2 is in the game Louis Catorze
where it's only used for the searchPath.

Note: cb_theassign() does the same thing for script and factories
2022-03-10 23:42:37 +01:00
Roland van Laar
c223a8f883 Director: Remove framerate fallback
The framerate byte is now understood. A framerate byte of 0 means a
framerate of 3. Which is handled during framerate parsing.
The check for 0 is therefor redundant.
2022-03-10 17:50:24 +01:00
Roland van Laar
01e914d937 Revert "DIRECTOR: Buildbot to test for lightswitch bit"
This reverts commit 5709e19d988ceafdf7bea11ca2953b46227e2035.
2022-03-10 17:44:16 +01:00
Roland van Laar
5709e19d98 DIRECTOR: Buildbot to test for lightswitch bit 2022-03-10 17:20:49 +01:00
Roland van Laar
20d2092045 DIRECTOR: Implement framerate 0x10
In Director 2 and 3 framerates are preset and referenced as: 0x0 to 0xF.
Some movies set a framerate of 0x10.

D2 and D3 interpret this as a framerate of 15.
Which was measured to be exactly the same as setting a framerate of 15.

In D4 it's shown as a framerate of 120.

Movies with a framerate of 0x10:
D2: DATA/WARLOCKSHIP/REUNION (spaceship warlock)
D4: ping.dir (chop suey)
2022-03-10 15:51:38 +01:00
Roland van Laar
9142f4454f DIRECTOR: LINGO: Fix else statement
An else statement was missing to the if. All proper framerates < 16 were
generating warnings in buildbot.
2022-03-09 18:04:24 +01:00
Roland van Laar
b5fcdb561b DIRECTOR: LINGO: improve framerate handling
The framerate can be set to 1, 2 and 3 via the tempo channel.
These are the actual framerates, meaning 1 fps is 1 fps.
2022-03-09 17:35:59 +01:00
D G Turner
5a7481141a DIRECTOR: Fix Redundant Declaration in Grammar Parser Code
This is emitted by GCC if -Wredundant-decls is passed.
2022-03-09 10:02:17 +00:00
Roland van Laar
00e6cf0411 DIRECTOR: Improve framerate loading D2 and D3
D2 and D3 have 16 distinct framerates, 0x0 to 0xF.
Framerates are integer values. They are rounded down towards their
nearest integer.

The following table is included for completeness.

The information was gathered by creating a D3 movie with an `on stepMovie` handler that counts every frame.
The setting is the setting on the slider in the D3 panel.
It was timed with clicking 'play' in D3 and start on a stopwatch at the
same time. The same for stopping the movie and the stopwatch.
FPS was calculated by dividing the amount of frames given by Director
and the time on the stopwatch.

setting     time        frames      fps
3           60.18       226         3.755
4           30.04       121         4.028
4.1         30.09       131         4.354
4.2         30.29       141         4.65
5           30.38       153         5.036
5.1         30.09       165         5.483
6           30.20       182         6.026
6.1         30.06       201         6.687
7           30.04       228         7.590
8           30.24       260         8.598
10          30.15       302         10.017
12          30.16       364         12.069
15          30.17       454         15.048
20          30.10       602         20.0
30          30.05       904         30.08
60          30.07       1811        60.226
2022-03-06 21:51:56 +01:00
Roland van Laar
3628584552 DIRECTOR: LINGO: Add XObject filenames
Director engine loads the XObject from the internal names inside the
resource since commit 930d9236b857ff
These changes adds the internal name for AppleAudioCD and LaserDisc to the
filelist.
2022-03-06 17:31:18 +01:00
Roland van Laar
fcfecfff52 DIRECTOR: LINGO: Add XObject filenames
Director engine loads the XObject from the internal names inside the
resource since commit 930d9236b857ff
These changes adds the internal name for PalXobj and RearWindow to the
filelist.
2022-03-06 17:25:04 +01:00
Roland van Laar
1902b94c13 DIRECTOR: LINGO: move XPlayAnim to XObject
XPlayAnim is an XObject. It was only used as a regular builtin during
development.
2022-03-06 16:49:32 +01:00
Roland van Laar
930d9236b8 DIRECTOR: LINGO: Implement loading rsrc XObjects
Xobject files on mac can contain multiple XObjects.
Parse the names of XCOD and XCMD resources and try to load them as
XObjects.
2022-03-06 11:07:35 +01:00
Roland van Laar
7801d86e79 DIRECTOR: LINGO: Improve events in xPlayAnim
- PACo stops playing on keydown and mousedown
- quit event quits scummvm
- refactor quit event handler to be callable from outside the main event
  loop
2022-03-06 10:07:05 +01:00
Roland van Laar
1be7de067b DIRECTOR: LINGO: xPlayAnim improvements
- keep last played frame displayed on screen
- stop playing the video on mouse click
2022-03-05 22:37:04 +01:00
Roland van Laar
bee055140f DIRECTOR: Sanity check PACo palette was off by one
Palette has a length of 256.
2022-03-05 22:11:40 +01:00
trembyle
b9e7b1dfcd COMMON: ENGINES: Correct Czech language ISO code
1. Correct constant in common files
2. Add the old code to obsolete language codes
3. Replace all occurences in engine code
2022-03-04 18:29:02 +01:00
Eugene Sandulenko
e584eddd50
DIRECTOR: Added sanity chack to PACo palette handler 2022-03-02 20:15:56 +01:00
Roland van Laar
69c367ebb8 DIRECTOR: LINGO: XplayAnim: thread safety
Make Palette restore thread save by copying the palette.
2022-03-01 21:14:32 +01:00
Roland van Laar
a5af85d6fb DIRECTOR: LINGO: Implement palette changes in PACo
PACo palette changes are now handled.
After playing the PACo file, switch back to the palette used in the
movie.
2022-03-01 17:09:01 +01:00
Roland van Laar
45483b3a7b DIRECTOR: LINGO: Improve PACo: xPlayAnim
Multiple improvements:

- use needsUpdate to display with the right framerate
- use system surface to draw the frames on, makes
  g_system->updateScreen()
- switch to the palette used in the video
- break when quitting scummvm
- cleanup after the video
2022-02-28 19:33:38 +01:00
Roland van Laar
e74ef17a6d DIRECTOR: LINGO: wip XPlayAnim for PACo
XPlayAnim is implemented as a lingo function.
It will currently only display the last frame in the current Palette.

Note: XPlayAnim should be an XObj. For that we first need to implement
loading Xobjects from rsrc files.
2022-02-21 19:20:01 +01:00
Roland van Laar
c20dc805c5 DIRECTOR: LINGO: Fix the stage keywords
Set the stage's coordinates, i.e.  top and left to 0, bottom and right
to the surface's height and width.

The stage coordinates, stageLeft, stageRight, stageTop and stageBottom
give the position of the stage with respect to the upper left of the
monitor (0,0).
In ScummVMs case we don't display outside the window and default to the
current window.

For more information see page 160 of the Director 3.1 Interactivity
Manual.
2022-02-21 18:56:40 +01:00
trembyle
4cb7a7a032 DIRECTOR: Expand detection for The Residents' work
Thanks to Discord user Parotaku for the assistance.
2022-02-16 13:03:58 -05:00
trembyle
15e9a71c9f DIRECTOR: Add detection for community discoveries
Assorted changes from discussions on Discord & trac

1. Les Shadoks (trac#12909)
2. English (multi) demo for Backpacker Jr
3. Expanded comments from additional research
4. Renamed Fuzzy Floppy to reflect series
5. English Winnie the Witch demo
6. Renamed gameid to avoid confusion with agi:winnie
7. Many more demo/shareware discoveries
8. Second detection files where conflicts introduced
9. Moved ypl2 to "Director extras" section from Chinese

Also a minor alphabetical resort for luxor.

Many thanks to the Discord crew (and some other channels), in
particular eientei, mstea, paratoku. Apologies if I forgot anyone!
2022-02-16 13:03:58 -05:00
eientei95
bf0397654f DIRECTOR: Decode score scripts using regional encoding 2022-02-08 21:36:44 +01:00
trembyle
84c94c8894 DIRECTOR: Revert Haunted House filepath
This game can be detected recursively by the users. Since the projector
and other data files are not in parallel directories, paths are not
required.
2022-02-08 10:59:54 -05:00
trembyle
53ed196747 DIRECTOR: Fix filepath for Haunted House
Now using full Windows path instead of directoryGlobs
2022-02-02 16:55:12 -05:00
trembyle
345a944142 DIRECTOR: correct detection filesizes 2022-02-02 09:27:59 -05:00
Misty De Meo
c065319a21 DIRECTOR: add more software 2022-02-02 09:27:59 -05:00
trembyle
1b4b9bb4a7 DIRECTOR: Add D6 tag to fallback detection
PJ97 was used for D6. This section will probably need to be replaced
in the future, but we might as well add the missing value while we're
still using it.
2022-02-01 15:38:41 -05:00
trembyle
a1b9ba2541 Revert "DIRECTOR: add more unsupported software"
This reverts commit 11946ca784884ebb3d39d2c74d6a996041d7f8e2.
2022-02-01 09:52:07 -05:00
Misty De Meo
11946ca784 DIRECTOR: add more unsupported software 2022-01-30 18:17:46 -05:00
Misty De Meo
3c52b4155b DIRECTOR: add more software 2022-01-30 18:17:46 -05:00
Roland van Laar
ad72a03676 DIRECTOR: Fix extra info in patch for warlock
Warlock windows got extra version information in the detection tables.
The result was that the patches didn't match anymore.
This is now resolved by adding the extra version info also in the lingo
patcher.

Commit which added the extra information: a767a592baba
2022-01-24 00:35:38 +01:00
Roland van Laar
3caf5013a6 DIRECTOR: Handle duplicate cast names
Multiple casts can have the same name. The last encountered cast with
that name was save in a hashtable.
Director seems to use the cast that was encountered last.
This solves the problem by not writing existing cast names.

It happened in the game Louis Catorze. The name mainMenu was associated
with a TextCast but also a ScriptCast. The chunkexpression 'line 5 of
mainMenu' is not valid for a ScriptCast.
2022-01-21 12:49:53 +01:00
Roland van Laar
eaa602bb3d DIRECTOR: LINGO: store comments from frame labels
In Director only the first line of a label is seen as the frame label.
The other lines are treated as comments.

The label comment is now shown with debugging ouput.
2022-01-20 23:59:17 +01:00
Roland van Laar
7fa0835be7 DIRECTOR: LINGO: Add v4 'the' mappings for cast
Adds mapping for text options.
The mappings follow the same patterns for kTheField.
2022-01-20 21:45:44 +01:00
trembyle
71d6f2c30b DIRECTOR: Remove installer from detection
Installers don't need to be in detection in addition to the games
themselves. This one was causing detection collisions with other
engines even after adding a second file.
2022-01-19 12:19:19 -05:00