Commit Graph

7 Commits

Author SHA1 Message Date
nmlgc 6f2881f056 [Maintenance] Remove `extern "C"` from more areas of code
The .PTN functions, vector functions, and egc_copy_rect_1_to_0_1()
(finally!) from TH01, as well as playfld.hpp from all games(finally!),
together with a bunch of other functions in their vicinity.

Part of P0201, funded by Ember2528 and Yanga.
2022-06-24 23:28:19 +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 23c46c6654 [Maintenance] [th05] Get rid of th05.hpp
That was surprisingly painless!

Part of P0147, funded by -Tom- and Ember2528.
2021-06-21 15:48:39 +02: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 18a8eccd2f [Decompilation] [th05] Bosses: Smooth random movement
Part of P0109, funded by [Anonymous] and Blue Bolt.
2020-08-16 21:41:34 +02:00
nmlgc 0644857fcb [Decompilation] [th05] Bosses: Smoothly flying towards a point
Found a uth05win inaccuracy! Once the Y coordinate gets close enough to
the target point, it actually speeds up twice as much as the X
coordinate would. This might make uth05win a couple of frames slower in
all boss fights from Stage 3 on.

And yeah, got too used to decompilation to go back to splitting off
RE'd functions in ASM land 😛

Part of P0109, funded by [Anonymous] and Blue Bolt.
2020-08-16 21:40:31 +02:00