Commit graph

303 commits

Author SHA1 Message Date
Eugene Sandulenko
47cbae39ca
DIRECTOR: Added stubs for XObjects for Jewels of the Oracle 2023-12-18 23:21:40 +01:00
Scott Percival
4f9720d862 DIRECTOR: XOBJ: Make CueSheet in AppleCDXObject a SharedPtr
XObjects are cloned by LC::call, which apparently has a magic copy
constructor. This means that any raw pointers inside the XObject will get
thrown into the cloned object, upsetting the fragile kayfabe of ownership
which underpins memory safety in C++.

Fixes the first movie switch in Classical Cats.
2023-12-16 15:36:16 +08:00
Misty De Meo
e9358aa491
DIRECTOR: move AppleCD cleanup to mDispose 2023-12-15 20:34:59 -08:00
Misty De Meo
6fbfab7eed DIRECTOR: fix memory leak in AppleCD 2023-12-06 20:37:48 -08:00
sluicebox
ae2dad1112 DIRECTOR: Fix memory leaks. PVS-Studio V773 2023-12-05 09:24:31 -08:00
Misty De Meo
b05e89dc52 DIRECTOR: AppleCD found in a D3 game 2023-12-03 20:58:36 +01:00
Misty De Meo
c0524f9bb7 DIRECTOR: implement more AppleCD methods 2023-12-03 20:58:36 +01:00
Scott Percival
2e6d5c8fca DIRECTOR: LINGO: Fix stubs for BlitPict XObj 2023-12-02 02:47:40 +01:00
eientei
d74f411a3a DIRECTOR: Add GetWindowsPath method to movutils 2023-12-02 02:35:39 +01:00
Misty De Meo
bf233f0076 DIRECTOR: CD xlibs support absolute positioning 2023-11-30 01:41:10 +01:00
sluicebox
b8c97f1561 DIRECTOR: Add newline at EOF 2023-11-25 20:52:22 -08:00
Scott Percival
04188be8be DIRECTOR: Fix detection entry for teamxtreme1 2023-11-25 02:03:38 +01:00
sluicebox
220d8f696a DIRECTOR: Fix memory leak on QuickTime error. PVS-Studio V773 2023-10-30 11:28:14 -07:00
sluicebox
42513cff3f DIRECTOR: Fix memory leak in FileExists. PVS-Studio V773 2023-10-30 11:28:14 -07:00
eientei
5e51ea8212 DIRECTOR: cdromxobj: Subtract 1 from the CD Audio track to play
This is based on the documentation that says to name ripped audio tracks
starting at 1 rather than their actual track index. I've seen this in
other engines that use CD audio tracks as well.
2023-10-29 00:55:55 +02:00
eientei
b99aa7b158 DIRECTOR: Note about another game that requires no virtual memory 2023-10-27 01:19:43 +02:00
Scott Percival
c973bc7db0 DIRECTOR: Update darkeye to use 32-bit colour 2023-10-25 18:22:15 +02:00
Scott Percival
432d2b07b7 DIRECTOR: XOBJ: Add WinInfo stub 2023-10-22 17:19:54 +02:00
Misty De Meo
6df6d5a173
DIRECTOR: add another filename for rear window
RW.XOB was seen in Yokai Ningen Bem (Mac).
2023-09-05 19:10:24 -07:00
Misty De Meo
8ade383e6a
DIRECTOR: misc xlib handles missing file 2023-08-25 09:43:15 -07:00
Misty De Meo
7eb19ad3bc
DIRECTOR: fix misc xlib finding movies
The only examples of this being used are for looking up movies.
findMoviePath will handle a file extension mismatch, which happens in
a D5 game that specifies a .DIR filename when the file on disc is .DXR.
2023-08-24 20:47:42 -07:00
Misty De Meo
111ebfd2a0
DIRECTOR: add willywabbitmath 2023-08-24 20:47:42 -07:00
Misty De Meo
9dd8922a8d
DIRECTOR: add Misc xlib
This is used in Around the World With Willy Wabbit (SEC Multimedia).
2023-08-17 22:00:49 -07:00
Eugene Sandulenko
53ee00b193
DIRECTOR: LINGO: Remove extra semicolons in XOBJ method prototypes 2023-08-10 17:53:48 +02:00
Eugene Sandulenko
8bccc12786
DIRECTOR: Reduce header dependency 2023-08-02 21:05:06 +02:00
Scott Percival
621c80355a DIRECTOR: XOBJ: Fix ManiacBg
Game expects the XLib name to be "foremost", and for calls to isForeMost
to update the screen mid-script.

Fixes most video playback in Maniac Sports.
2023-07-23 14:07:20 +02:00
Scott Percival
2394440978 DIRECTOR: XOBJ: Add the first non-standard extension to FileIO
Macromedia provided the full source code of FileIO as an example for
XLib developers, so it stands to reason that people would make their
own build with extra functions.

Fixes the initial movie switch in Maniac Sports.
2023-07-23 14:07:20 +02:00
Misty De Meo
22df3142be DIRECTOR: add Quicktime xlib for journey2source 2023-07-22 21:55:56 +02:00
Scott Percival
2f64b8cd32 DIRECTOR: XOBJ: Add stub for ManiacBg 2023-07-19 10:52:01 +02:00
Harishankar Kumar
fdd8c34691 DIRECTOR: Rename _frame, getCurrentFrame(), getTotalFrames() to improve readability 2023-07-10 16:03:11 +02:00
Misty De Meo
f56a9648d6 DIRECTOR: FileIO: use default filename
When Director initializes the file browser, it can specify a default
filename as well. Some games use this to make suggestions about save
game names. For example, Ganbare! Inuchan 2 will use the default
save name of `INU.DAT`. ScummVM was silently ignoring the value
before this.
2023-07-08 22:14:41 +03:00
Scott Percival
8555abd76a DIRECTOR: XOBJ: Add another alias for FlushXObj and FixPaletteXObj
Fixes Chop Suey for Mac.
2023-07-08 22:01:00 +03:00
Scott Percival
17e43beb3d DIRECTOR: Add alias for RearWindow XObj 2023-07-08 22:01:00 +03:00
Scott Percival
1a84d4d94b DIRECTOR: XOBJ: Add stub for DirUtil 2023-07-08 22:01:00 +03:00
Scott Percival
17e1853347 DIRECTOR: Refactor path detection
Previously, paths were verified by pathMakeRelative().
This method had several drawbacks; the code was increasingly ad-hoc
and recursive, and the function would return a Common::String that
was not guaranteed to be distinct. 90% of the time the path would need
to be converted to Common::Path so that file streams could use it.

This code has been replaced with findPath(), a function which takes a
path string as recieved from Director (e.g. a Lingo script, a filename
stored in a CastInfo record) and returns a Common::Path object for the
file on the local system. The inner workings have been split into subfunctions,
which should make it easier to add workarounds and fuzz at the correct
layer.
2023-07-08 22:01:00 +03:00
Scott Percival
862a79aa06 DIRECTOR: Add stub for Consumer XObj 2023-07-08 22:01:00 +03:00
Misty De Meo
cd970d5942
DIRECTOR: fix FileIO::m_fileName
Adding one to the prefix's length meant the first character of the
filename would be omitted.

Fixes Ganbare Inuchan 2 creating savegames with the first letter the
player typed missing.
2023-07-05 15:18:50 -07:00
Harishankar Kumar
e3eb3c8bf6 DIRECTOR: Implement EventQ xobject stubs
Implemented eventq xobject using stubs.

`undome` of 'mediaband-win' uses this xobj for events buffering.
2023-06-21 00:47:00 +02:00
Scott Percival
a5a7ebe7f7 DIRECTOR: Add alias to Misc_X 2023-06-14 18:39:41 +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
Scott Percival
07608d13ec DIRECTOR: Add stub for Color XObj 2023-06-08 09:16:30 +02:00
Harishankar Kumar
76d1590ccc GRAPHICS: Implement smartmenu for macpopups
Smartmenu implementation using offsetY to displace popup such that the previous selected item will fall onto cursor, includes checked item and highlighted.

For `Popup Menu` in theapartment, without this patch the second popmenu was not remembering the last selected item and was opening it from scratch, after this patch popupmenu will open from the last selected item already selected with checkbox.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
8aa6ed2110 DIRECTOR: Implement popupmenuxobj for macpopmenu
Implements xlib methods for popupmenu creation/item selection, uses macpopmenu internally.

Used for implementing 'Popup Menu'  in theapartment, with this popupmenu are working.
2023-05-28 13:50:18 +02:00
Scott Percival
a439d0c790 DIRECTOR: XOBJ: Add QTVR stubs 2023-05-10 09:48:50 +02:00
Eugene Sandulenko
b62757d138
DIRECTOR: LINGO: Remove unused variable 2023-04-29 14:25:03 +02:00
Scott Percival
14af094515 DIRECTOR: XOBJ: Replace stub boilerplate with macro 2023-04-29 14:20:05 +02:00
Scott Percival
a407f165a6 DIRECTOR: XOBJ: Remove directory from fileio paths
Jamming an absolute Windows path into a filename is allowed on Linux,
however Windows isn't as forgiving.

It would be nice to preserve the full path of the saved file;
unfortunately the SaveFileManager API doesn't support subdirectories.
For now just keep the old pattern of [gameid]-[filename].txt.

Fixes save games in Operation: Eco-Nightmare
2023-04-29 14:20:05 +02:00
Scott Percival
f4cbadaca2 DIRECTOR: XOBJ: FindSys must return a path with a slash 2023-04-29 14:20:05 +02:00
Scott Percival
f0343d6f02 DIRECTOR: Add stubs for BatQT XObj 2023-04-29 14:20:05 +02:00
eientei
b329c674c7 DIRECTOR: ValkyrieXObj: Resolve CID 1509049 2023-04-24 16:06:33 +02:00