Commit Graph

8 Commits

Author SHA1 Message Date
nmlgc 641cdec9f2 [Maintenance] [th04/th05] Dialog: Start a new translation unit with shared code
Thanks to the required word alignment of the `switch` jump table in
TH05's dialog_op(), we do in fact have to slice dialog code into
exactly two* translation units. Three might have been better because we
would have only needed to compile this shared code once, but TH05 also
has one exclusive function in the area covered by this new shared
translation unit anyway. At least we can meaningfully share the actual
source files between games here.

* With an additional one at the end for now, because I absolutely had
  to RE that EMS code in late 2021, but we'll catch up with that one in
  the end.

Part of P0258, funded by [Anonymous] and Blue Bolt.
2023-10-31 22:33:29 +01:00
nmlgc 8b338353f8 [Reverse-engineering] [th04/th05] Dialog: Cursor position
Part of P0244, funded by Blue Bolt and [Anonymous].
2023-06-13 04:26:26 +02:00
nmlgc 719baa3a5e [Naming] [th04/th05] Dialog: Main function
The `_animate()` convention doesn't *really* fit for a function that
also handles input, but I'd rather continue using the same convention
for every blocking multi-frame function.

Part of P0186, funded by [Anonymous] and Blue Bolt.
2022-03-27 00:33:46 +01:00
nmlgc 90a2e367bc [Decompilation] [th04] EMS / Dialog: Exit function
That's where TH04 crashes in Stage 5 without an EMS driver, but the
code is fine?! (Well, apart from its silly behavior in the Extra
Stage.)

Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:10 +01:00
nmlgc 7673456ab3 [Decompilation] [th04] EMS / Dialog: Loading the remaining images
What the hell is TH05 doing there…?

Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:10 +01:00
nmlgc d48479ce1b [Reverse-engineering] [th04/th05] Dialog: Face unblitting
TH01-style unblitting from the back page of VRAM, in my TH04/TH05?!
It does make sense to suspend double buffering during dialog though,
and you probably don't want to call any custom stage rendering
functions just to effectively unblit a 128×128 pixel area.

Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:10 +01:00
nmlgc a1ebba2fae [Reverse-engineering] [th04/th05] Dialog: Currently speaking side
Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:09 +01:00
nmlgc 1b3755c592 [Maintenance] [th04/th05] Dialog: Move UI code to a subdirectory under main/
Why did I put all that under formats/?! This doesn't even contain
anything about the format yet.

Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:09 +01:00