Commit Graph
345 Commits
Author SHA1 Message Date
Scott Percival b163dba86d DIRECTOR: Add CD loading delay quirk
Spaceship Warlock is optimised for very slow disk reads; quite a lot of
movie changes will be preceded by a music cue and a still image, knowing
that the system will take a couple of seconds to read the next file.

As a compromise, add a fake delay of [file size]*1000/150000 ms to movie
switches. This can be short-circuited by clicking the mouse, so it is
still possible to navigate around quickly.
2024-02-09 21:17:57 +08:00
Le Philousophe cf3eac29c3 DIRECTOR: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Scott Percival 597904524e DIRECTOR: Fix holes in Window ownership
- Add guardrails to m_forget
- Treat g_director->_currentWindow as a reference-counted copy
- Move MacWindowManager cleanup out of ~Datum into Window::decRefCount
2023-12-02 02:47:40 +01:00
Eugene Sandulenko 8bccc12786 DIRECTOR: Reduce header dependency 2023-08-02 21:05:06 +02:00
Harishankar Kumar dc17d62416 DIRECTOR: Set underlying window to background
This patch sets the flag background for score (or main director engine)
window, It is useful because it prevents the window from jumping to front
of other windows (ie from `open` command) and thus shadowing it.

Fixes `title of window` from workshop, where clicking outside opened window
used to disappear it beneath the main window.

Also fixes 'totaldistortion-win' sequencer TV, when clicking anywhere except
the TV screen, the window used to disappear.
2023-08-02 18:42:24 +02:00
Eugene Sandulenko 28d1694ec8 DIRECTOR: Mark journey2source as 32bpp 2023-07-22 13:42:52 +02:00
Eugene Sandulenko 3e0318dcca DIRECTOR: Move quirk640x480Desktop() to GF_ 2023-07-22 13:38:46 +02:00
Scott Percival 45f5678eab DIRECTOR: Add ability to fake the current date
Required for titles which stop working after a certain date,
e.g. the Hollywood High "Be a Hollywood Hot Shot Contest" promo.
2023-07-19 10:52:01 +02:00
Eugene Sandulenko 95d8cf840c DIRECTOR: _allOpenResFiles -> _allSeenResFiles 2023-06-29 23:22:54 +02:00
Eugene Sandulenko c03b317944 DIRECTOR: Wrap 32-bpp usage into #ifdef USE_RGB_COLOR 2023-06-14 15:16:44 +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
Eugene Sandulenko 69a372672e DIRECTOR: Properly set volume on starting sound. Store sound volume defaults. 2023-06-06 19:43:32 +02:00
Eugene Sandulenko c0e198c8f8 DIRECTOR: Avoid crashing on empty filenames in detection 2023-06-03 00:12:10 +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
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 ec76e5dfc6 DIRECTOR: Refactor palette loading for D5
Previously, the palette ID namespace was shared between cast ID, builtin
ID and resource fork ID. This was quite messy.

The new approach is to use CastMemberID; builtin palettes are libId -1,
cast palettes use their respective libId, and a null CastMemberID
indicates a blank entry.
2023-05-10 09:48:50 +02:00
Einar Johan Trøan Sømåen c3b1baf906 DIRECTOR: Refactor BitmapCastMember to store a Picture instead of decoder
This is in preparation for allowing for Lingo to get/set the picture
of BitmapCastMember.

In particular, storing a Picture lets us easily replace the existing
image (instead of having to rely on ImageDecoder as source).

Also, having Picture instances that are easy to copy will make lifetime
management easier if pictures are copied into longer-living things such
as globals.
2023-03-26 19:11:46 +02:00
Scott Percival d2d8dc3935 DIRECTOR: Add quirk for Eastern Mind to limit score FPS 2023-03-24 21:27:34 +01:00
Eugene Sandulenko cce1cca608 DIRECTOR: Set depth of 5 for directory globs
This fixes teamxtreme2 that has all game files sitting in DATA/ directory.
2023-02-02 18:23:55 +01:00
Eugene Sandulenko 85ef974d55 DIRECTOR: Override delayMillis() and skip delays when fast execution is requested 2023-01-28 23:53:59 +01:00
Eugene Sandulenko cd7afdb9f7 DIRECTOR: Do not hang buildbot when movies cannot be loaded 2023-01-19 15:43:52 +01:00
Roland van Laar 0caa469e09 DIRECTOR: set dirseparator on windows platforms: \
Director 4 and later games for windows use filepaths where '\' is the separator.
Games for mac use ':', which was the default.
Director 3 and earlier games were authored on Mac and thus use the ':'
internally.

This fixes a bug where the filename for c:\fileio.dll was parsed
to \fileio.dll. Due to the default ':' everything after the ':' was
seen as the filename.
2023-01-19 00:06:25 +01:00
Vladimir Serbinenko af7d9cb850 COMMON: Move punycode_*codepath to path.cpp
This allows to reduce access to DIR_SEPARATOR from outside of Common::Path
2022-12-14 05:08:46 +01:00
Scott Percival 873095c87e DIRECTOR: Move current Lingo state into Window-owned struct
The previous arrangement was to copy the bits of Lingo state back and forth from
the Window object to the Lingo instance, and query the window for the
callstack. This refactor consolidates the current Lingo state into a single
struct, owned by the Window object and accessible via a pointer on the
Lingo object.
2022-12-09 01:10:57 +01:00
Scott Percival 9c3de4c269 DIRECTOR: Make "the pathName" return an absolute path
In Director, Lingo calls to fetch "the pathName" would provide an absolute
path, including the volume. getCurrentPath() originally provided a
relative path, which meant root level would return "". There is at least
one title that checks "the pathName" isn't blank as part of the content
detection routine. Given that from an internal perspective,
getCurrentPath() is always an absolute path from the game root, we can
add a fake drive letter for Windows at the front.

Fixes loading in DEVO Presents: Adventures of the Smart Patrol.
2022-10-22 19:53:22 +02:00
Scott Percival 4ec70de496 DIRECTOR: Add 'console' debug flag 2022-10-22 19:53:22 +02:00
Roland van Laar 0091a20fe9 DIRECTOR: limit files closed by closeResFile
Lingo function `closeResFile` is only responsible for closing resource
file opened by `openResFile`. Register in `openResFile` which files
where opened and close only those files in `closeResFile`.

- Rename `_openResFiles` to `_allOpenResFiles` and
- Add new `_openResFiles` hashmap to track which files were opened in
  `openResFile`.
2022-09-23 22:55:50 +02:00
Scott Percival 756cfdd27d DIRECTOR: Make DirectorEngine copy palettes on use
This is going to be the basis for the palette-cycling effects.
2022-09-12 15:52:18 +02:00
Eugene Sandulenko fa815cc92a DIRECTOR: Remove unnecessary global constants 2022-07-19 23:46:58 +02:00
Eugene Sandulenko 1cd3b914e1 DIRECTOR: Fix desktop mode 2022-07-19 23:46:57 +02:00
Eugene Sandulenko 88dedd276e JANITORIAL: Rename constants to follow our code naming conventions 2022-07-19 20:25:06 +02:00
Pragyansh Chaturvedi 5c17fe70b8 JANITORIAL: Fix conventions and reimplement MacFontManager::rectifyId() 2022-07-17 13:04:14 +02:00
Pragyansh Chaturvedi c4f6aa89b9 GRAPHICS: Implement assigning of windows font, check for wrong fontId while loading stxt, read name from FON files DIRECTOR 2022-07-17 13:04:14 +02:00
Eugene Sandulenko 16f4854a59 DIRECTOR: Always scan game directory 5 levels deep 2022-07-10 16:09:24 +02:00
Misty De Meo 987065e090 DIRECTOR: allow customizing desktop mode size 2022-07-07 15:59:41 +02:00
Misty De Meo 95f7d681c5 DIRECTOR: move gameQuirks to end of constructor 2022-07-06 01:47:16 +02:00
Misty De Meo d99da56120 DIRECTOR: check _wmMode for desktop 2022-07-06 01:47:16 +02:00
Misty De Meo 3fdc914754 DIRECTOR: promote wmMode to instance variable 2022-07-06 01:47:16 +02:00
eientei 7a54ff26f7 DIRECTOR: Add Pippin platform 2022-06-22 23:38:15 +02:00
Pragyansh Chaturvedi (r41k0u) ad6b80009f DIRECTOR: LINGO: Implement setting of timeOutLapsed property 2022-06-22 01:13:41 +02:00
Pragyansh Chaturvedi (r41k0u) ee242176af DIRECTOR: LINGO: Implement kTheFixStageSize property STUB 2022-06-21 01:08:10 +02:00
Eugene Sandulenko 11aa622e6f DIRECTOR: Do not hog CPU 2022-06-18 11:26:49 +02:00
Pragyansh Chaturvedi (r41k0u) ec3a741c29 DIRECTOR: LINGO: Implement copyToClipBoard and pasteClipBoardInto STUBs in Lingo Builtins 2022-06-17 00:03:06 +02:00
Christian Kündig a880ef2b6b DIRECTOR: EMSCRIPTEN: Yield back to the browser in the mail loop 2022-06-12 14:34:13 +02:00
Eugene Sandulenko e8f113bf5a DIRECTOR: Print out D pixelformat on startup 2022-06-06 19:31:09 +02:00
Eugene Sandulenko 93412a5bab DIRECTOR: Created file for hosting game-specific quirks and moved a few there 2022-06-03 14:04:16 +02:00
Roland van Laar 738def31a0 DIRECTOR: Implement lingo repl in debugger
When in debug mode enter: lingo on
The prompt will start with lingo) to indicate the repl is active.
To stop enter: lingo off

This will allow developers to interactively inspect the current state of
the program.

Only statements that fit on one line are supported.
2022-03-22 23:39:54 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 85e8f765c1 DIRECTOR: Switch detection to full paths and modify lzone-win for using it 2021-11-30 23:59:23 +01:00
djsrv d66aff96c7 DIRECTOR: Clarify purpose of getPlatformEncoding 2021-11-08 23:44:08 -05:00