Commit Graph
54 Commits
Author SHA1 Message Date
Matthew Duggan d87db4db51 DGDS: Use a different font for HOC DE dialogs
Looking at a video of the original, it looks like the DE version should use the
same font for the dialogs and menus in order to get the umlauts.

This fixes #15817.
2025-04-04 20:05:32 +11:00
Filippos Karapetis d8eb52a2cb DGDS: Clean up includes 2025-03-10 18:53:20 +02: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 d1dd49a6d8 DGDS: Fix beamish dialog workaround a little 2025-03-02 19:24:34 +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 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
Le Philousophe c0171b0c98 DGDS: Don't use deprecated primitives 2025-01-24 12:11:17 +01:00
Matthew Duggan b344d053a5 DGDS: Fixes for willy beamish interactions
Willy handles dragging of items a bit differently to the other games, try to be
a bit more like the original.  Specifically:
* Drag-drop does not need the mouse to be held down
* Don't reopen the inventory if that's where we dragged an item from

Also fix some small crashes in an older Willy Beamish demo.
2025-01-23 19:50:48 +11:00
Matthew Duggan cbcee066c0 DGDS: Fix selection of partial line dialog actions
This is required when hypnotising the guard in Willy Beamish.
2025-01-04 12:30:15 +11:00
Matthew Duggan 0005ca1a96 DGDS: Show Willy's dollars correctly in inventory 2025-01-04 12:30:15 +11:00
Matthew Duggan ce0439e01f DGDS: Fix Willy dialog rendering 2025-01-04 12:30:15 +11:00
Matthew Duggan 29bc5487cd DGDS: Implement willy trouble gauge 2024-12-30 20:47:58 +11:00
Matthew Duggan 3db6e1344b DGDS: Small rendering fixes for Willy Beamish 2024-12-24 14:08:42 +11:00
Matthew Duggan aacfc96983 DGDS: Fix fonts for Beamish dialogs 2024-12-21 17:52:57 +11:00
Matthew Duggan b4f70c660d DGDS: Refactor scene class a bit
Extract SceneOp and SceneCondition to their own files to reduce file size a
bit.

Also fix some small issues in CDS loading.
2024-12-16 18:27:13 +11:00
Matthew Duggan 564747e3be DGDS: Only search for title before CR
Colons are allowed to appear in the dialog string if they appear after a CR.

This fixes #15535.
2024-11-30 16:01:10 +11:00
Filippos Karapetis 94403bd3a9 DGDS: Raise debuglevel of all debug statements to at least 1
This reduces the chatty debug output, which isn't of any use to
regular users
2024-11-16 18:44:46 +02:00
Matthew Duggan 54cafe5733 DGDS: Implement Willy Beamish type talking heads
There are a few differences in the way the talking heads work in Willy Beamish
vs HoC.  This only implements the FDD version of Willy Beamish heads. The CD
version has different data to implement animated talking heads and voice
acting.
2024-11-16 21:20:35 +11:00
Matthew Duggan cea5b29fb5 DGDS: Fix crash on German dgds intro
The font functions take u32 but that was sign-extending when coming out of a
non-u32 string.  This never comes up in the English version, but the German
font has codepoints over 128.

Also fixed a couple of places where it was incorrectly measuring a string
position instead of a char value.

This fixes #15450.
2024-11-03 14:11:13 +11:00
Matthew Duggan 605833246a DGDS: Fix word wrapping of dialogs to be more like original
This fixes the trailing space problem that was putting some dialogs in the
wrong place and wrapping some text too much.
2024-10-26 20:07:41 +11:00
Matthew Duggan 3141414e3a DGDS: Fix Dragon arcade sequences a bit
Dragon arcade sequences should run at 15 FPS, the rest of the game runs at 30.

This also fixes a potential issue with stale data after load/save, and
correclty starts the music.
2024-10-26 16:05:48 +11:00
Matthew Duggan 74ebf32934 DGDS: WIP Rise of the Dragon arcade support 2024-09-22 10:01:25 +03:00
Matthew Duggan 53b24ac793 DGDS: Implement Willy Beamish scroll
Still not totally rendering correctly, but partly works (eg, scroll in
Principal's office at start of game)
2024-07-28 14:14:35 +10:00
Matthew Duggan 9f6ef63891 DGDS: Render HoC intro text more correctly 2024-07-27 19:31:11 +10:00
Matthew Duggan e9f7121d7a DGDS: Implement HoC shell game 2024-07-26 21:12:08 +10:00
Matthew Duggan 4da41d8f5b DGDS: Fix HoC buttons and menus to match original
HoC mostly pixel-correct to original menus and inventory now.
2024-07-20 19:40:43 +10:00
Matthew Duggan de1b7a07dd DGDS: Fix dialogs for strings with empty lines at end 2024-07-20 10:28:28 +10:00
Matthew Duggan 2bd84e77bc DGDS: Small rendering fixes to be more like original
Thanks to @eriktorbjorn for noticing the inconsistencies and suggesting fixes.

* Adjust X position of timestamp in RotD inventory
* Fix y offset of type 2 dialogs
* Make inventory button visible in background after opening inventory
2024-07-20 09:44:20 +10:00
Matthew Duggan 6eecc57d48 DGDS: Update shekel count when viewing them in inventory 2024-07-20 09:44:20 +10:00
Matthew Duggan 52b928f23c DGDS: Fix Willy Beamish dialogs a bit 2024-07-16 10:48:34 +10:00
Matthew Duggan 761d144709 DGDS: Keyboard navigation for dialogs 2024-07-10 22:32:17 +10:00
Matthew Duggan 61ab4902fb DGDS: Fix willy scene and dialog parsing slightly
First scene now sort of works, still quite buggy.
2024-07-08 20:54:00 +10:00
Matthew Duggan 30a7e3a7df DGDS: Fix uninitialized values identified by Coverity 2024-07-08 19:42:49 +10:00
Matthew Duggan eeecc8dc5b DGDS: Add various heart of china features
Most dialogs now render correctly and the game is partly playable.  Still a
bunch of work to do for inventory and menus to render correctly.

Added loading for TDS (talking head) data structures too, but they are not yet
used.
2024-07-07 16:15:30 +10:00
Matthew Duggan ffef4790f4 DGDS: Fix font, music, and rendering slightly in SQ5 demo 2024-06-30 22:49:18 +03:00
Matthew Duggan f7baf88cf2 DGDS: Cleanups, remove excessive casts 2024-06-30 22:49:18 +03:00
Matthew Duggan c3b0b32df5 DGDS: Implement RST (reset state) loading 2024-06-30 22:49:18 +03:00
Matthew Duggan 15f8a90b31 DGDS: Refactor to split into smaller files
Split TTM and ADS logic into their own files, and separate palette management
from image loading.

Also refactor scene types a bit to be more objecty.
2024-06-30 22:49:18 +03:00
Matthew Duggan a15c1cb1e1 DGDS: Various fixes to font and dialog handling 2024-06-30 22:49:18 +03:00
Matthew Duggan 45cc070eb8 DGDS: Fix wrapping with space padding 2024-06-30 22:49:18 +03:00
Matthew Duggan 48ce6e938b DGDS: Fix some drag-drop, dialog, and resource loading issues 2024-06-30 22:49:18 +03:00
Matthew Duggan 1a714adcd8 DGDS: Fix dialog selection 2024-06-30 22:49:18 +03:00
Matthew Duggan 6f94da020a DGDS: Fix dialog item selection 2024-06-30 22:49:18 +03:00
Matthew Duggan affe5bf0b8 DGDS: Add initial load/save code 2024-06-30 22:49:18 +03:00
Matthew Duggan 3c091686ed DGDS: Fix more rendering and execution issues 2024-06-30 22:49:18 +03:00
Matthew Duggan 98185eb48b DGDS: Hack in some dialog stuff 2024-06-30 22:49:18 +03:00
Matthew Duggan 01525c55b5 DGDS: Add code to draw game clock
Always on for now, but can be easily changed to turn on and off.
2024-06-30 22:49:18 +03:00
Matthew Duggan 0be203599e DGDS: Small fixes to dialog rendering. Still broken. 2024-06-30 22:49:18 +03:00
Matthew Duggan dc4b2bce3f DGDS: Load all frames of an image at once
This allows us to be more accurate to the original and more efficient.
2024-06-30 22:49:18 +03:00