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.
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.
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].
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].
We don't really gain anything from pretending that these description
IDs are anything other than raw array indices.
Part of P0262, funded by [Anonymous] and Blue Bolt.
Wait, *what*, the alignment issues even stretch up to those functions?
And since TH05's version of the MIKO.CFG code lies much further down,
we now end up with this horrible #include placement asymmetry between
the two games. At least we now don't need a cross-TU workaround for
TH04's "MIKO.CFG" string either.
Part of P0262, funded by [Anonymous] and Blue Bolt.
Once again, word alignment of a `switch` jump table forces us to put
both the game start and main menu code into the same translation unit,
despite the former being fundamentally different between the two games.
Oh well, this also avoids the need for a cross-TU workaround for the
"main" and "deb" binary filename strings.
Part of P0262, funded by [Anonymous] and Blue Bolt.
`RANK_DEFAULT` raised the question why ZUN just didn't directly assign
the apparent default of `RANK_NORMAL`. Turns out that this is what
triggers the first-launch setup menu.
Part of P0262, funded by [Anonymous] and Blue Bolt.
Having to comb through them and change their `#pragma option -zC` names
after adding a new one is pretty annoying, after all. This way, we also
get to move some of those 2020 decompilations out of the `th05/`
subdirectory, matching the more consistent directory hierarchy that
this project has converged on in the years since.
Part of P0261, funded by [Anonymous] and Yanga.
It's rather noisy, the header isn't supposed to be publicly used
anyway, and the TH03/TH04/TH05 cutscene system uses the same
conventions. Also shortening the `CURSOR_` constants to `TEXT_`.
Part of P0258, funded by [Anonymous] and Blue Bolt.
Thanks to the required word alignment of the `switch` jump table in
TH05's dialog_op(), we do in fact have to slice dialog code into
exactly two* translation units. Three might have been better because we
would have only needed to compile this shared code once, but TH05 also
has one exclusive function in the area covered by this new shared
translation unit anyway. At least we can meaningfully share the actual
source files between games here.
* With an additional one at the end for now, because I absolutely had
to RE that EMS code in late 2021, but we'll catch up with that one in
the end.
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.