Commit Graph

24 Commits

Author SHA1 Message Date
nmlgc 20bac82005 [Decompilation] [th02] Stage bonus calculation and rendering
For both regular and extra stages.

Completes P0279, funded by Yanga and Blue Bolt.
2024-04-12 00:31:24 +02:00
nmlgc 0935e84a83 [Decompilation] [th02] Stage bonus: Table row rendering
Very unfortunate that this has to go into the overlay translation unit
due to the upcoming functions near-calling the `far overlay_wipe()`
function.

Part of P0279, funded by Yanga and Blue Bolt.
2024-04-12 00:31:24 +02:00
nmlgc 459cdd6fe0 [Maintenance] [th02] Score: Consolidate rendering functions
Part of P0278, funded by Yanga.
2024-04-12 00:29:09 +02:00
nmlgc 57211ac4d9 [Naming] [th02] Text overlay: Emphasize unsignedness for 8-digit number display
The declaration already used `uint`.

Part of P0278, funded by Yanga.
2024-04-12 00:29:09 +02:00
nmlgc 61cd04c103 [Maintenance] [th02] Score: Define a single type for score values
No unsigned score values in this game. Yet…

Part of P0278, funded by Yanga.
2024-04-12 00:29:09 +02:00
nmlgc 26926080bc [Maintenance] Remove `extern "C"` from more areas of code
This commit covers
• TH02/TH03/TH04/TH05's frame_delay() and frame_delay_2() (finally!)
• TH02/TH03/TH04/TH05's game_init_main()
• TH02's graph_copy_rect_1_to_0_16()
• TH03/TH04/TH05's cfg_load_resident_ptr()
• TH05's piano_setup_and_put_initial() and piano_render()

Part of P0264, funded by [Anonymous] and Blue Bolt.
2024-02-02 23:59:34 +01:00
nmlgc 0ab7359c88 [Decompilation] [th02] Text overlay: Stage transitions
That #pragma proves this to have been a separate translation unit… but
it at least sort of fits into `hud.cpp`. Could have gone either way.

Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
2023-07-01 05:22:22 +02:00
nmlgc dfa758da89 [Decompilation] [th02] Gaiji loading and freeing
Completes P0242, funded by Yanga.
2023-06-07 15:34:37 +02:00
nmlgc fefeb1859d [Decompilation] [th02] HUD: Full rendering
Part of P0242, funded by Yanga.
2023-06-07 01:32:45 +02:00
nmlgc b38db78441 [Decompilation] [th02] HUD: Score rendering
Part of P0242, funded by Yanga.
2023-06-07 01:18:32 +02:00
nmlgc 6763b44dd0 [Decompilation] [th02] Score: Turning the current delta into a bonus
By leaving out just the one `score_delta = 0;` assignment, ZUN created
a function with semantics so complex that it already required naming
all other score-related functions just to make sense of it.

Part of P0242, funded by Yanga.
2023-06-07 00:40:27 +02:00
nmlgc 7e64c1cc06 [Decompilation] [th02] HUD: Life and bomb display
Part of P0242, funded by Yanga.
2023-06-06 21:38:27 +02:00
nmlgc 0d28c116c0 [Decompilation] [th02] HUD: Power bar rendering
Which also commits power changes to the shot level…

Part of P0242, funded by Yanga.
2023-06-06 21:37:07 +02:00
nmlgc 7bd0ac3f17 [Reverse-engineering] [th02] Score deltas
Part of P0242, funded by Yanga.
2023-06-06 21:20:57 +02:00
nmlgc 71c010855d [Maintenance] [th02/th04/th05] Properly declare shot power-related variables
Part of P0237, funded by Yanga.
2023-03-29 18:03:05 +02:00
nmlgc 68aa320982 [Decompilation] [th02/th04/th05] Text overlay: Fill functions
Part of P0225, funded by Enderwolf, Blue Bolt, 32th System, and Yanga.
2022-11-30 22:46:22 +01:00
nmlgc afbca78e6c [Decompilation] [th02] Text overlay: Right-aligned 8-digit number display
Oh look, a small TH02-only commit! Might as well decompile the small
function in front of TH02's overlay_wipe(), so that I can include it
in the next commit.

Part of P0225, funded by Enderwolf, Blue Bolt, 32th System, and Yanga.
2022-11-30 22:46:22 +01:00
nmlgc 39fd88d728 [Maintenance] [th02/th04/th05] Text overlay: Adopt "playfield TRAM" code
Part of P0186, funded by [Anonymous] and Blue Bolt.
2022-03-27 00:33:51 +01:00
nmlgc 3a41604314 [Decompilation] [th04/th05] Text popups
The bullet update function really needs this one declared in C land to
link without a fixup overflow? Guess we'll have another technical debt
push before then…

Part of P0148, funded by [Anonymous].
2021-07-20 23:35:46 +02:00
wintiger0222 db206f9d41 [Reverse-engineering] [th02/th04/th05] HUD: Bar colors
Reviewed and merged as part of P0112, funded by [Anonymous] and Blue
Bolt.
2020-08-28 16:21:13 +02:00
nmlgc db0adbc58f [Maintenance] [th02/th04/th05] Rename `HUD_TRAM_W` to `HUD_KANJI_W`
Right, *_TRAM_W refers to 8-pixel halfwidth characters, and *_KANJI_W
to 16-pixel full-width characters… which also include gaiji, which are
what the entire HUD is made out of.

Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:30:34 +02:00
nmlgc fb67d4d054 [Maintenance] Rename all old *_X and *_Y constants to *_LEFT and *_TOP
Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:14:22 +02:00
nmlgc 368f151759 [Maintenance] Declare distinct types for screen, VRAM, and TRAM coordinates
Whew, time to look at every `int` variable we ever declared! The best
moment to do this would have been a year ago, but well, better late
than never. No need to communicate that in comments anymore.

These shouldn't be used for widths, heights, or sprite-space
coordinates. Maybe we'll cover that another time, this commit is
already large enough.

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:30 +02:00
nmlgc d1f3dcd620 [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory
Adding op/, main/, and end/ directories does nicely cover a great
majority of the "not really further classifiable slices" implied in
d56bd45.

Part of P0086, funded by [Anonymous] and Blue Bolt.
2020-04-15 20:58:01 +02:00