And we're finally polyfilling std::array to avoid writing these hack
structures over and over.
Unfortunately, we can't ever polyfill it *exactly* because Turbo C++
4.0J neither supports namespaces nor template classes nested inside
non-template classes to simulate namespaces. Might as well go for a
PascalCased class name in accordance with the existing coding style
then – no need to add an exception just to have a class name like
`std_array` or something.
Part of P0260, funded by Yanga.
Exactly 4 years and 1 month after 881f2c6, TH02 finally received the
dedicated attention for this feature. But Why are the options rendered
with PAT_OPTION_A all the time? 🤔
Part of P0259, funded by Splashman and Yanga.
And the fact that TH04 and TH05 do it automatically. This allows us to
share the 'm' command implementation between the cutscene system and
the upcoming decompilation of TH04's dialog system… after developing
another new piece of decompilation tech 👀
Part of P0258, funded by [Anonymous] and Blue Bolt.
If only `th04/main/tile/render_a.asm` were at the same place in both
games, then it would have made sense to decompile it right away.
Part of P0258, funded by [Anonymous] and Blue Bolt.
This commit covers
• TH02's ZUNINIT errors,
• TH02's main menu,
• the init/exit functions in all 4 remaining games,
• TH03/TH04/TH05's configuration file functions, and
• TH04/TH05's tile rendering functions.
Part of P0258, funded by [Anonymous] and Blue Bolt.
The vertical shmup counterpart to 841d8be. Cleans up the subsystem
hierarchy by ensuring that at least all tile /formats/ code does not
depend on /main/ code.
Part of P0258, funded by [Anonymous] and Blue Bolt.
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.
It's going to show up again for TH04's Stage 4 midboss, as well as the
big explosion sprite, and this turns out to be the reason why ZUN did
it consistently. master.lib being lazy is enough of a reason to upgrade
each of these instances to a fixable bug.
Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
By now, it has become clear that this the norm rather than the
exception among these units. Thankfully!
Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
I could have equally argued the opposite way, and in favor of `sgm` and
`ofs`, but I've also been using `seg` and `off` more prevalently
throughout the years.
Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
These functions are placed rather far away from other stage-related
code, which suggests a distinct translation unit.
Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
"1D polar vectors" are a weird concept to wrap your head around,
especially if their constructor function takes a sine or cosine ratio
instead of an angle. This function is way closer to the polar_*()
family, which has these convenient `_x` and _y` suffixes that we could
just remove for this generic function to fit into there.
Part of P0244, funded by Blue Bolt and [Anonymous].
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.