Commit Graph

8 Commits

Author SHA1 Message Date
nmlgc 1e41fa0617 [Maintenance] Remove redundant `#include`s
Part of P0285, funded by [Anonymous] and iruleatgames.
2024-07-09 08:46:51 +02:00
nmlgc b61e612fdf [Maintenance] #include each header's dependencies within the header itself
OK, this is the big one. We still keep using `#include` guards only
where we absolutely need to, but with each header now being valid in
isolation, this can now actually help *minimize* the length of each
translation unit's `#include` list. Turns out that after removing all
the duplicates, we only *actually* need to guard 29 headers across all
5 games.

Part of P0285, funded by [Anonymous] and iruleatgames.
2024-07-09 08:46:42 +02:00
nmlgc e353800f46 [Maintenance] Hidden #include dependency removal: TH04
Part of P0284, funded by [Anonymous] and Blue Bolt.
2024-07-09 08:42:24 +02:00
nmlgc dba448965e [Maintenance] Hidden #include dependency removal: Subpixels
Part of P0284, funded by [Anonymous] and Blue Bolt.
2024-07-09 08:42:09 +02:00
nmlgc 6e93bb2a52 [Reverse-engineering] [th04] Custom entity structure 2: Stage 4 Marisa's bits
Part of P0240, funded by JonathKane.
2023-05-30 01:26:02 +02:00
nmlgc 944a66cf77 [Maintenance] [th04/th05] Bosses: Single-file, multi-segment code structure
As implied in adffa1c, a single segment-switching translation unit for
both rendering functions and game logic is the most straightforward
solution for those two games. Especially once you look at TH04, and
realize that the wildly chaotic order of the *_fg_render() functions in
the first code segment exactly matches the order of the *_update()
functions in the third.

Part of P0225, funded by Enderwolf, Blue Bolt, 32th System, and Yanga.
2022-11-30 22:46:22 +01:00
nmlgc 6f2881f056 [Maintenance] Remove `extern "C"` from more areas of code
The .PTN functions, vector functions, and egc_copy_rect_1_to_0_1()
(finally!) from TH01, as well as playfld.hpp from all games(finally!),
together with a bunch of other functions in their vicinity.

Part of P0201, funded by Ember2528 and Yanga.
2022-06-24 23:28:19 +02:00
nmlgc c90c7d52c4 [Decompilation] [th04] Stage 4 Marisa: Point-reflected movement
This is the function that causes Marisa's `Divide Error` crash when
called during a 4-frame window during the end of certain patterns.
Just like with Kurumi's division by zero, it's just as undefined here
what should happen instead, and any possible fix can only ever be a
fan-fiction interpretation of the code. And since the community will
have an easier time understanding and debating a C++-level hack instead
of an ASM-level one, it makes sense to first decompile this function…

…and document it, which is actually much harder!

Part of P0189, funded by Arandui and Lmocinemod.
2022-04-17 00:00:35 +02:00