Almost three years after the big SHARED segment separation got
unfortunately stuck thanks to this function, it's finally done!
Part of P0265, funded by [Anonymous] and iruleatgames.
So anticlimactic, again…
Also, note how renaming the `end_sequence_t` constants to better match
their usage also simplifies the explanatory comment for TH04's
not-quirk.
Part of P0265, funded by [Anonymous] and iruleatgames.
With the implementation moved to the header, it makes sense to
duplicate the function in the unfortunate place where the filename is
supposed to be.
Part of P0265, funded by [Anonymous] and iruleatgames.
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.
Yup, there's more! About time we started a general coordinate header
that will ultimately be independent of `pc98.h`.
Part of P0264, funded by [Anonymous] and Blue Bolt.
Ah, the first time I encountered Q12.4 subpixels, way back in early
2018… I'd like this to be the final piece of code decompiled in either
of these games, but its data needs to be moved to C land now since it
blocks the Music Room.
And yes, we even have to compile this one twice.
Part of P0263, funded by [Anonymous].
I think this is the first time that function pointers as `inline`
function parameters actually inlined perfectly?
Part of P0263, funded by [Anonymous].
Been a while since I abused string constants for temporary alignment
hacks! Almost forgot about that technique. This time around though, I'm
using `$` to address the extra string in C land, which only *slightly*
breaks position independence.
Part of P0263, funded by [Anonymous].
Breaking the usual naming convention as I'm going to use these
functions names more like constants in the final code.
Part of P0263, funded by [Anonymous].
And yes, replicating them in ASM land does speed up decompilation, as I
don't have to pause and manually look up each value.
Too bad that the two resident structure assignments and the different
.PI freeing functions are the only reasons why we have to compile the
entire thing twice. Would have been nicer if ZUN had directly saved the
selection to MIKO.CFG instead 😛
Part of P0263, funded by [Anonymous].
Wow, that was unexpectedly painless – even for TH03 where we have to
deal with a significant number of un-RE'd pieces of data. And for TH04
and TH05, it turns out that we not only *want* to move the entire _TEXT
segment into the new unit to keep the amount of `extern` declarations
to a minimum, but in fact *have* to because of graph_putsa_fx()'s fancy
labels in the data segment.
Part of P0263, funded by [Anonymous].
The asymmetry of having to do this for TH05's resident structure but
not for TH04's has finally become annoying enough.
Part of P0263, funded by [Anonymous].