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.
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.
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.
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.