Commit Graph

13 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 93ad67e60c [Decompilation] [th04/th05] Midbosses: Activation and reset functions
Stupid one-off functions deserve stupid names, Part 4.

Part of P0192, funded by [Anonymous], nrook, and -Tom-.
2022-05-01 00:22:03 +02:00
nmlgc 5edc459749 [Decompilation] [th04/th05] Midbosses: Sprite area invalidation
Part of P0192, funded by [Anonymous], nrook, and -Tom-.
2022-05-01 00:22:03 +02:00
nmlgc bcf19490f0 [Decompilation] [th05] Stage 1 midboss: Main function
Part of P0192, funded by [Anonymous], nrook, and -Tom-.
2022-05-01 00:22:03 +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 019405a241 [Maintenance] [th04/th05] Declare common (mid-)boss phases as proper constants
The fanciness of expressing these as signed constants probably hurted
the understandability of the code more than it helped.

Part of P0189, funded by Arandui and Lmocinemod.
2022-04-16 23:53:46 +02:00
nmlgc ac7822ec71 [Decompilation] [th04/th05] Boss and midboss player shot collision handling
Awesome! The last of the shared TH04/TH05 boss functions, completed
just as the money for that sort of thing ran out. Time to decompile
some actual bosses!

Part of P0188, funded by [Anonymous] and nrook.
2022-03-27 01:50:07 +01:00
nmlgc 354a4724f3 [Decompilation] [th04/th05] Bosses: Defeat sequence
With TH04's version hardcoding not only Gengetsu's dialog and
initialization, but also the Bad Ending after having clearing Stage 5
with continues or on Easy difficulty.

Part of P0188, funded by [Anonymous] and nrook.
2022-03-27 01:35:37 +01:00
nmlgc e9b2a98363 [Decompilation] [th04/th05] Bosses / Midbosses: End-of-phase score bonus
Part of P0186, funded by [Anonymous] and Blue Bolt.
2022-03-27 00:33:51 +01:00
nmlgc a21ab3d225 [Decompilation] [th04/th05] Midbosses: Defeat animation update function
This code structure is driving me insane.

Completes P0185, funded by [Anonymous], -Tom-, and Blue Bolt.
2022-03-05 17:50:33 +01:00
nmlgc db05bffca3 [Maintenance] Turn motion_t into a template
motion_t is also used for certain animations in MAINE.EXE, so not all
instances refer to entities in playfield space. Explicitly specifying
the latter now allows us to gain…

Part of P0149, funded by Blue Bolt, Ember2528, and -Tom-.
2021-07-31 09:33:50 +02:00
nmlgc 11b5febc5a [Maintenance] [th04/th05] Move midboss declarations to their own header file
Part of P0147, funded by -Tom- and Ember2528.
2021-06-20 19:36:14 +02:00
nmlgc d1f3dcd620 [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory
Adding op/, main/, and end/ directories does nicely cover a great
majority of the "not really further classifiable slices" implied in
d56bd45.

Part of P0086, funded by [Anonymous] and Blue Bolt.
2020-04-15 20:58:01 +02:00