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.
No point in prettifying this dumb copy macro if we're going to throw it
out on the future `debloated` branch anyway. Avoiding compiler warnings
by removing seemingly superfluous `if` statements is much more
important.
Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
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.
PAT_BULLET16_N_BLUE and PAT_BULLET16_N_RED are just meant to be generic
color range indicators with no semantic meaning.
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.
What a fitting memory reference to pick as the final one to be labeled
and made position-independent. That's 100% for TH04!
Completes P0244, funded by Blue Bolt and [Anonymous].
Turns out that the convoluted control flow we've seen in TH05's boss
code was also present in TH04…
Part of P0244, funded by Blue Bolt and [Anonymous].
One of which also has the convenient responsibility of adding or
subtracting a number from the skill metric…
Part of P0244, funded by Blue Bolt and [Anonymous].
Didn't have to do this for TH05 because we had the budget to decompile
most of them way back in P0037, but now we don't.
Part of P0244, funded by Blue Bolt and [Anonymous].
TH04's shot flags are defined in terms of that duration… which is where
we also find out it runs 4 frames faster in TH05.
Part of P0244, funded by Blue Bolt and [Anonymous].
And that's it…? All staff roll-related false positives removed, and we
didn't even have to decompile any of the staff roll blitting functions?
Part of P0244, funded by Blue Bolt and [Anonymous].
Matching the sane ones we use for TH01 and TH02. Them being macros will
actually help with two cases in TH03 and TH04 that inconsistently use
inlined polar calculations rather than calling polar()…
Part of P0244, funded by Blue Bolt and [Anonymous].
"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].