Commit Graph

9 Commits

Author SHA1 Message Date
nmlgc 456768a4ff [Contributing] Define `struct`, `class` and `template` naming conventions
Again, these are what I've been mostly following, apart from a few
inconsistencies which this commit also fixes.

Part of P0207, funded by GhostPhanom.
2022-08-08 20:10:38 +02:00
nmlgc bca1b7d38a [Maintenance] Add a `nullptr` polyfill to platform.h
Which allows us to remove <stddef.h> from translation units that just
needed it for `NULL`.

Part of P0203, funded by [Anonymous] and GhostRiderCog.
2022-07-10 13:02:51 +02:00
nmlgc 270d376089 [Maintenance] Add min/max abstractions for constrained random numbers
Way easier to read compared to the mental gymnastics of the original
"offset + range" form, especially since we can also abstract away
subpixels with another layer of wrapper functions. Also brings a bunch
of new speed/angle symmetries to light.

Part of P0190, funded by nrook.
2022-04-30 14:37:23 +02:00
nmlgc 718590908f [Maintenance] [th04/th05] Remove `extern "C"` from more areas of code
Mostly centered around the HUD, popup, overlay, boss, and player shot
functions we're about to reference in the upcoming decompilations.

Part of P0186, funded by [Anonymous] and Blue Bolt.
2022-03-26 20:44:54 +01:00
nmlgc 1244bd74e7 [Maintenance] Prefer the -zC and -zP options over `#pragma codeseg`
Might look uglier, but has the advantage of not generating an empty
segment with the default name… *and* the default padding, which will
really come in handy with the following breakthrough.

Part of P0137, funded by [Anonymous].
2021-04-03 20:12:09 +02:00
nmlgc 164591f9fe [Maintenance] Consistently express angle literals in signed hex format
Originally just a workaround to remove angles from the PI counter, but
having the sign indicate the Y direction also makes them a lot nicer to
read in C land.

(Maintenance mode commit)
2020-10-02 14:48:54 +02:00
nmlgc 624b66f3ca [Maintenance] [th04/th05] Add a segment split before the title popup functions
A bit tricky with those ASM translation units near-calling functions in
the very first segment, and #pragma codeseg requiring an additional
group parameter to correctly calculate array offsets (including those
used for `switch` statements). But doable.

Part of P0089, funded by [Anonymous] and Blue Bolt.
2020-05-03 23:28:25 +02:00
nmlgc 02f0a0afcc [Build] Don't word-align everything by default
Again, 11 necessary workarounds, vs. forcing byte aligment in at least
18 places, and that number would have significantly grown in the
future.

Part of P0085, funded by -Tom-.
2020-04-03 17:35:57 +02:00
nmlgc 83f422c61a [Decompilation] [th05] Character-independent shot type functions
Part of P0062, funded by Touhou Patch Center.
2019-12-22 15:37:36 +01:00