Commit graph

77 commits

Author SHA1 Message Date
Matthew Duggan
b2fa3fea3b DGDS: Update to GPL3 to match the rest of ScummVM 2024-07-02 09:59:59 +10: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
2e408a73c3 DGDS: Fix msvc build 2024-06-30 22:49:18 +03:00
Matthew Duggan
cd1aba710a DGDS: Fix ADS while handling and improve debug messages 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
38185598b6 DGDS: Remove foreground buffer
With this change, the rendering now seems to closely match the original in most
situations.
2024-06-30 22:49:18 +03:00
Matthew Duggan
7e27347b55 DGDS: More tweaking to rendering to match originals
This is still not quite right.  I will need to add a mask layer it seems, as
running TTM opcode 0020 (save background) after drawing a color 0 rect is *not*
the same as running that opcode after just drawing a bmp on the foreground.
2024-06-30 22:49:18 +03:00
Matthew Duggan
723761ec2f DGDS: Fix some inventory interactions 2024-06-30 22:49:18 +03:00
Matthew Duggan
b593f026f7 DGDS: Fix small things to make china not crash 2024-06-30 22:49:18 +03:00
Matthew Duggan
2b9f38ede1 DGDS: Fix script timing values to match original 2024-06-30 22:49:18 +03:00
Matthew Duggan
ccdfdb683d DGDS: Implement opening menu from script 2024-06-30 22:49:18 +03:00
Matthew Duggan
c263922adf DGDS: Load active script on save/load 2024-06-30 22:49:18 +03:00
Matthew Duggan
9c06c52e4f DGDS: Load/save background image name 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
c028ebf8ce DGDS: Fix dragging out of inventory 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
33057f412e DGDS: Improve debug, fix store opcode. 2024-06-30 22:49:18 +03:00
Matthew Duggan
c0d78c7ded DGDS: Rename buffers to make it more understandable
Also properly fix GOTO opcode this time.  This fixes a bunch of things in the
shower at the start of the game.
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
a3097b4628 DGDS: Implement minimal ops to make HoC boot 2024-06-30 22:49:18 +03:00
Matthew Duggan
272827e9d4 DGDS: support for multi-ads, inventory now sorta works 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
c219ffd53e DGDS: Add object-object interactions 2024-06-30 22:49:18 +03:00
Matthew Duggan
1030ef3224 DGDS: Implement more inventory stuff 2024-06-30 22:49:18 +03:00
Matthew Duggan
2f44f3f1a2 DGDS: Start to implement Inventory screen 2024-06-30 22:49:18 +03:00
Matthew Duggan
9b7f8d9bf3 DGDS: Fix scene rendering a bit
The front and back buffers should only be combined after all scripts have
executed.
2024-06-30 22:49:18 +03:00
Matthew Duggan
617c364469 DGDS: Fix more scene op running 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
Matthew Duggan
24ff433799 DGDS: Small tweaks to drawing ops 2024-06-30 22:49:18 +03:00
Matthew Duggan
0381ea72dd DGDS: Implement ADS logic OR and AND opcodes 2024-06-30 22:49:18 +03:00
Matthew Duggan
f0a45e2bd2 DGDS: Implement even more TT3 and ADS opcodes 2024-06-30 22:49:18 +03:00
Matthew Duggan
734c67ee8c DGDS: Fix build on some platforms 2024-06-30 22:49:18 +03:00
Matthew Duggan
302331f071 DGDS: Implement some more ADS and TTM opcodes 2024-06-30 22:49:18 +03:00
Matthew Duggan
af5fbb6f32 DGDS: More work on dialogs and scenes 2024-06-30 22:49:18 +03:00
Matthew Duggan
470e01f0ca DGDS: Mostly implement original dialog behavior 2024-06-30 22:49:18 +03:00
Matthew Duggan
ea049fe010 DGDS: Fix ADS branch handling to match original
Now the Dragon intro gets up to the actual intro sequence, then locks up
because we don't yet handle dialog events correctly.
2024-06-30 22:49:18 +03:00
Matthew Duggan
a3c5458985 DGDS: More ADS execution improvements 2024-06-30 22:49:18 +03:00
Matthew Duggan
24b306ac9a DGDS: Fix one-shot ttm opcodes 2024-06-30 22:49:18 +03:00
Matthew Duggan
f273055d2b DGDS: Slight script execution improvements 2024-06-30 22:49:18 +03:00
Matthew Duggan
f7770582fd DGDS: Add more debugging for frame progression 2024-06-30 22:49:18 +03:00
Matthew Duggan
be29343c7c DGDS: Add sfx as a separate thing from music 2024-06-30 22:49:18 +03:00
Matthew Duggan
bbe68b84d7 DGDS: Fix ADS and TTM interpreters even more
The first part of the intro now runs again!  And now it's all running in the
way it's supposed to - script states are being controlled by scene ops as
designed, rather than just running through them in order.
2024-06-30 22:49:18 +03:00
Matthew Duggan
247b1750f7 DGDS: More ADS improvements 2024-06-30 22:49:18 +03:00
Matthew Duggan
66800f48dc DGDS: Properly implement some ADS if conditions
Still don't support OR and AND operations but this should be enough for the
first parts of the game.
2024-06-30 22:49:18 +03:00
Matthew Duggan
aadb9ecbc1 DGDS: Fix TTM initialization 2024-06-30 22:49:18 +03:00
Matthew Duggan
1c9ea68069 DGDS: More ADS fixes, now mostly working
ADS files now seem to basically execute correctly!  Now to move on to fixing
TTMs - currently screen updates are broken.
2024-06-30 22:49:18 +03:00
Matthew Duggan
1aca7ded40 DGDS: More work to move ADS and TTM execution closer to original
Scenes still don't play, but the logic is getting very close to the original
now.  Probably just a few small tweaks to get it going.
2024-06-30 22:49:18 +03:00
Matthew Duggan
7bd0be7a71 DGDS: More work on ADS and TTM 2024-06-30 22:49:18 +03:00
Matthew Duggan
c72cca34e3 DGDS: ADS and TTM implementation
* Rename TTM objects to match original ideas of environment and sequence
* Implement more ADS stuff in line with original - states etc
* Implement sceneop 4 which changes ADS states

Currently this breaks everything (no scenes execute) but the implementation is
far closer to the original, so it's a necessary step to get to a correct
reimplementation.
2024-06-30 22:49:18 +03:00
Matthew Duggan
0d3d6caa30 DGDS: Rename some op lists to better names, call some on scene change 2024-06-30 22:49:18 +03:00