Commit graph

559 commits

Author SHA1 Message Date
Matthew Duggan
d3ed56f4ad DGDS: Better font load debug message 2025-03-31 20:12:07 +11:00
Matthew Duggan
6a5916cf6c DGDS: Map menu ids in DE version of Heart of China
Most games use the same menu IDs for the same menus, but this version uses some
different IDs to the others.  To avoid having to redo too much for a single
game variant, just map the menu IDs.

This fixes #15818.
2025-03-31 20:12:07 +11:00
Matthew Duggan
9f08ec5372 DGDS: Skip CDS draw op if head shape was freed
This fixes #15829.
2025-03-31 20:12:07 +11:00
Matthew Duggan
9a65cabb71 DGDS: Fix Willy Beamish head rendering a bit
The hack to keep the blueprints visible broke other interactions.  Add a more
targetted hack to make it work.  Also fix willy's head flipping when it shouldn't.
There are still some issues overall with head rendering (lipsync issues) but
it's much better now I think.

This fixes #15821.
2025-03-29 16:49:20 +11:00
Matthew Duggan
363634529d DGDS: Add comment on data structure choice 2025-03-29 14:09:45 +11:00
Matthew Duggan
aa02e9d30a DGDS: Annotate EGA detection entries for Heart of China
Mark them as "EGA" to make it more explicit during detection.

This fixes #15832.
2025-03-27 19:40:26 +11:00
Filippos Karapetis
1cfa228906 ENGINES: Use pointers when deleting inside range loops 2025-03-27 13:47:57 +08:00
Filippos Karapetis
ad27ff215c DGDS: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Matthew Duggan
5462978ddf DGDS: Add detection for Willy Beamish French FDD
This fixes #15822.
2025-03-25 20:28:22 +11:00
Matthew Duggan
c23f893c62 DGDS: Fix TTM scroll operation slightly
This improves the speed and end-state of the bar scroll in Heart of China.
2025-03-25 20:18:47 +11:00
Matthew Duggan
36ca3e4e86 DGDS: Add detection for German VGA Heart of China
This fixes #15825.
2025-03-25 20:17:56 +11:00
Kawa
7cc3ce82af DGDS: Correct spelling in minigame 2025-03-21 21:25:56 +02:00
Matthew Duggan
ac5719ccfd DGDS: Add detection for Heart of China German EGA
This fixes #15809.
2025-03-20 20:12:40 +11:00
Matthew Duggan
8737ca7c14 DGDS: Ignore invalid frame draw ops in CDS scripts
There is an invalid frame referenced in some CDS scripts, etc F1B32.CDS.
Ignore these requests.

This fixes #15800.
2025-03-16 13:21:55 +11:00
Matthew Duggan
5607de83a0 DGDS: Fix implementation of a few HoC globals
Implement difficulty level and pal fade globals.
2025-03-15 17:45:17 +11:00
Matthew Duggan
62e02ca0da DGDS: Unload music file before loading game
This makes sure no matter which scene is loaded the music will be loaded fresh
and restarted.

Skip in Willy Beamish where there is only one music file that stays loaded.

This fixes #15795.
2025-03-15 15:18:48 +11:00
Matthew Duggan
199a6d072d DGDS: Upgrade Heart of China detection to TESTING 2025-03-13 18:14:48 +11:00
Filippos Karapetis
7170223f83 DGDS: Remove unused/superfluous code 2025-03-10 18:53:25 +02:00
Filippos Karapetis
8514b4b647 DGDS: Fix initializers 2025-03-10 18:53:24 +02:00
Filippos Karapetis
3f1323de73 DGDS: Simplify usage of strcmp() 2025-03-10 18:53:23 +02:00
Filippos Karapetis
169cdf4458 DGDS: Add missing default cases to switch statements 2025-03-10 18:53:22 +02:00
Filippos Karapetis
88cedb80c7 DGDS: Remove dead/unimplemented code 2025-03-10 18:53:21 +02:00
Filippos Karapetis
d8eb52a2cb DGDS: Clean up includes 2025-03-10 18:53:20 +02:00
Filippos Karapetis
8dfda9e663 DGDS: Merge the "Play game" code paths of the two China mini-games.
The interface options available before starting the two mini-games are
the same
2025-03-10 14:33:00 +02:00
Matthew Duggan
b1d37b9053 DGDS: Return to train map when skipping train arcade
This avoids a debug box asking us what ending we want.

This fixes #15784.
2025-03-10 18:29:25 +11:00
Matthew Duggan
957e4a0cd7 DGDS: Multiple mouse fixes to match original
This changes the mouse behavior to better match the original games.

* Left-click "use" should only happen on a short click (mouse button goes down
  and up within a few frames) - longer clicks should always do "pick up"
  operation.
* Right-click "look" should only happen on short clicks, longer right button
  should start targetting mode
* Both-click should operate on all areas under the mouse, ignoring their
  conditions

This fixes #15774 and #15782, and also fixes eg Rise of the Dragon trying to
fire the gun in Blade's apartment.
2025-03-09 14:45:31 +11:00
Matthew Duggan
4ca22fca5f DGDS: Remove unused accessor 2025-03-06 17:18:25 +11:00
Matthew Duggan
3082cabc0c DGDS: Avoid crash from dialogs being reallocated
When we dynamically load dialog data it's possible for the list to be
reallocated during resize.  If we were also executing operations from one of
the reallocated dialogs, it would crash when accessing that pointer again.

Switch the dialog data to a List so it will not be reallocated when loading
more data.

This fixes #15781
2025-03-06 17:18:25 +11:00
Matthew Duggan
07a82f4883 DGDS: Fix dialog area in HoC
HoC dialogs have a different usable width depending on whether they have a
header or not. Use numbers that better match the original.

This fixes #15780
2025-03-06 17:18:25 +11:00
Matthew Duggan
9220e7530d DGDS: Update comment 2025-03-04 20:56:04 +11:00
Matthew Duggan
452b5989ff DGDS: Fix interpretation of text speed setting
* The inversion (9 - value) was being applied twice, reversing
  the resulting delay
* The delay in the dialog data should be doubled before calculating delay
  millis
* The default setting should be 5

This fixes #15771
2025-03-04 20:55:55 +11:00
Matthew Duggan
c70541cf90 DGDS: Update Willy Beamish CD detection slightly
Note that it's the CD version to make it easier for users.

Also added comment explaining that we don't use the RME file directly, but
it's convenient for detection.
2025-03-03 11:41:11 +11:00
Matthew Duggan
2b2c6412c5 DGDS: Add detection entry for Willy Beamish FDD 1.01
Fixes #15773
2025-03-03 11:12:09 +11:00
Matthew Duggan
b4fcc999b1 DGDS: Don't change music if id is the same 2025-03-02 19:52:27 +11:00
Matthew Duggan
d1dd49a6d8 DGDS: Fix beamish dialog workaround a little 2025-03-02 19:24:34 +11:00
Matthew Duggan
4bda66c474 DGDS: Move Willy Beamish from Unstable to Testing 2025-03-02 19:23:16 +11:00
Matthew Duggan
d4948067e6 DGDS: Use Willy Beamish FDD MT32 patches in CD version
Unfortunately, the CD version never offically supported MT-32 for SFX and music
because the voice acting needed a Sound Blaster.  This means it was shipped
with corrupted MT-32 patches for the SFX.

The GOG version of the game comes with both CD and FDD data together, so add
the ability to load MT-32 patch information out of the FDD version if it's also
present.
2025-03-02 16:08:34 +11:00
Matthew Duggan
093b84863f DGDS: Implement Willy Beamish main menu help 2025-03-02 14:52:01 +11:00
D G Turner
31096de6ee DGDS: Fix Fallthrough in TTM Interpreter 2025-03-02 03:28:45 +00:00
Matthew Duggan
d93ff33845 DGDS: Small fixes for Willy Beamish head rendering
Correct offset to render location and flipping to be more like original.
2025-03-02 08:02:31 +11:00
Matthew Duggan
800f291143 DGDS: Hold open "head" dialogs with no sound until they are closed
This is used for the Willy Beamish blueprints.  Don't close until needed if no
sound is present.
2025-03-02 08:02:31 +11:00
Matthew Duggan
82430b3344 DGDS: Also fix dialog artifact on viewin blueprints 2025-03-02 08:02:31 +11:00
Matthew Duggan
2d1298c457 DGDS: Fix type 1 dialog rendering in Willy Beamish 2025-03-02 08:02:31 +11:00
Matthew Duggan
ef7e1f034a DGDS: Fix dropping in inventory for Willy Beamish 2025-03-02 08:02:31 +11:00
Matthew Duggan
e205d41bd7 DGDS: Workaround for flashing bug over some Willy Beamish dialogs
Some willy beamish scenes contain hacky 20x20 type 4 dialogs to do some other
action.  They appear over the main dialog.

Eg, CD version dlg file D25.DDS dialogs 102 and 103 - one of these is triggered
when Tiffany stands on the scales on day 3.

This causes a flashing artifact over the dialog even in the original.  Work
around this issue by not drawing anything if the dialog is too small to
actually contain text.
2025-03-02 08:02:31 +11:00
Matthew Duggan
3568ebb7c3 DGDS: Avoid possible invalid access on shutdown 2025-03-02 08:02:31 +11:00
Matthew Duggan
c81b25bf10 DGDS: Fix crash when sucking babysitter into vacuum cleaner
In Willy Beamish CD version, the dialog for this moment includes a global scene
op with no arguments.  Ignore it as the original game does.
2025-03-02 08:02:31 +11:00
Matthew Duggan
a1f21c1a3e DGDS: Reset minutes added on scene change
All game variants do this, somehow I missed it before.

This fixes being able to leave the living room while running away from the
babysitter in Willy Beamish CD version.
2025-03-02 08:02:31 +11:00
Matthew Duggan
af7636fb19 DGDS: Log segment name if available 2025-03-02 08:02:31 +11:00
Matthew Duggan
5299435d7d DGDS: Set higher priority on music than sfx
It was possible for music to stop when multiple sound effects were played at
once (eg, Willy Beamish FDD intro sequence when SFX 43 and 44 are played in
quick succession).  This is a workaround for that issue.
2025-03-02 08:02:31 +11:00