The string literal placement issue mentioned in 942373e doesn't seem to
be an actual problem (anymore). This is also much simpler, as we get to
save tons of `extern` declarations at the cost of one additional
`#pragma option`.
Part of P0002, funded by GhostPhanom.
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.
This will end up at the end of Mima's translation unit. Might as well
start a separate temporary one then, which will simplify the diff once
we eventually merge it into that future Mima TU which is very likely to
grow from top to bottom.
Part of P0279, funded by Yanga and Blue Bolt.
Many thanks to KirbyComment and Colin Douglas Howell for documenting
their research into rank on Touhou Wiki. Just like in TH01, rank also
only affects bullet speed in this game, but let's use the `playperf`
naming scheme from TH04 and TH05 to make it less confusing – at least
until we exactly know the unit of this variable.
Part of P0279, funded by Yanga and Blue Bolt.
The stage bonus functions require the stage-specific ones, which are
updated next to the total ones, which are required by the skill
calculation that we need to explain what we just saw in the verdict
screen… What a coincidence! (Yes, this actually wasn't planned.)
Part of P0279, funded by Yanga and Blue Bolt.
All of these are scalar values with at most a dependency on
`platform.h`. Since these item-related values are mainly read by
score/skill calculation code, it makes sense to declare them in a
dedicated header along with the upcoming metrics.
Part of P0279, funded by Yanga and Blue Bolt.
On the list of functions yet to be decompiled, these were at number 7
and 1, respectively, which corresponds to number 7 and 22 on the total
list of functions in PC-98 Touhou.
Completes P0278, funded by Yanga.
For once, I'm glad that ZUN copy-pasted this one-off function.
Otherwise, it probably wouldn't have been that easy to factor out.
Part of P0278, funded by Yanga.
Matching TH04 and TH05 functions, which differentiate between raw
sensing and resetting+sensing. In that light, the previous name for
TH02's function was rather misleading for leaving out that crucial
detail…
Part of P0278, funded by Yanga.
Needed for a constness overloading hack later. A certain single place
in TH02 will need the `str` parameter to not be `const` for code
generation reasons, but we don't want to force every call site into
passing non-`const` pointers for such a silly reason.
Part of P0278, funded by Yanga.
Also dropping the `_8` as it's irrelevant to a fullscreen image.
And yes, we'll see a version without palette mutation.
Part of P0278, funded by Yanga.
Might as well give a more descriptive name to the variable than
something involving the generic `screen` (which we've started using for
coordinates) and the inconsistent `back` (which always means "back page
of VRAM", which has nothing to do with this bitplane).
Also, turns out that this was in fact the only place that did a 32-wide
memcpy() of a full VRAM bitplane.
Part of P0264, funded by [Anonymous] and Blue Bolt.
Featuring a return of the recently developed `$ -` tech, along with
some unfortunate PI breaks… But hey, at least it makes sense to start
out with this move!
Part of P0264, funded by [Anonymous] and Blue Bolt.
I might change this convention again in the future, particularly once
someone wants to fund C89 conformance, but let's stay consistent for
now.
Part of P0264, funded by [Anonymous] and Blue Bolt.
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.