Commit Graph

15 Commits

Author SHA1 Message Date
nmlgc d9427b0761 [Maintenance] [th02/th04/th05] Remove `extern "C"` from more areas of code
The TH04/TH05 gather functions, as well as the TH02 vector functions.

Part of P0227, funded by nrook.
2023-01-16 10:16:12 +01:00
nmlgc 3e79deeb3a [Contributing] Define function brace placement rules
I've been following them pretty consistently for a while now, time to
finally write them down.

Part of P0204, funded by [Anonymous] and Yanga.
2022-07-10 13:45:18 +02:00
nmlgc 901eda4594 [Maintenance] Consistently indent preprocessor macros
Let's see if anyone ever tries to compile this codebase with a pre-C89
compiler that enforces the # at the beginning of the line.

Part of P0203, funded by [Anonymous] and GhostRiderCog.
2022-07-10 13:06:26 +02:00
nmlgc 8d953dc42e [Decompilation] [th03/th04/th05] 2D direction vector construction
Hey, a disgustingly impossible "decompilation" again, for a change!

Completes P0137, funded by [Anonymous].
2021-04-04 00:02:50 +02:00
nmlgc bda7b16758 [Maintenance] Move the polar coordinate conversion functions to their own file
math/vector.hpp needs zero dependencies, this needs master.hpp.

Part of P0137, funded by [Anonymous].
2021-04-03 22:31:00 +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 a1653146da [Separate translation units] [th02] 2D vector functions
Part of P0132, funded by [Anonymous].
2021-01-05 19:51:41 +01:00
nmlgc fe4c92a066 [Maintenance] [th01] Add separate functions for polar coordinate calculation
I'm still impressed that something like this perfectly inlines in every
place that uses this functionality so far. Maybe something about each
parameter only being used once inside the single expression of the
function?

Part of P0120, funded by Yanga.
2020-09-28 12:43:29 +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 e3a78bd19b [Maintenance] Fix vector creation function declarations and calls
Part of P0099, funded by Ember2528.
2020-07-12 15:22:50 +02:00
nmlgc 580fa8301a [Decompilation] [th02] Random number ring buffer reads, instance #2
And that's how you decompile from the beginning of a segment.

Part of P0085, funded by -Tom-.
2020-04-03 17:32:49 +02:00
nmlgc e65cf0d05d [Maintenance] Change a few ASM .inc files to use 8.3 names
Part of P0035, funded by zorg.
2019-09-24 21:58:18 +02:00
nmlgc 3b7561a711 [Maintenance] Export all pascal functions with their proper uppercase names
Yup, that was one massive screw-up.

Part of P0030, funded by zorg.
2019-09-15 20:29:47 +02:00
nmlgc 4b8baf1413 [Reverse-engineering] [th02/th03/th04/th05] Random number ring buffer
Yes, you're reading that correctly. If the cursor is at 255, reading a
16-bit value will fill the upper 8 bits with the neighboring cursor
value, which always is 0xFF.

Funded by -Tom-.
2018-03-16 18:12:21 +01:00
nmlgc 92979e8f31 [C decompilation] [th02] Code segment #2 of all three executables
Only one code segment left in both OP and FUUIN! its-happening.gif

Yeah, that commit is way larger than I'm comfortable with, but none of these
functions is particularly large or difficult to decompile (with the exception
of graph_putsa_fx(), which I actually did weeks ago), and OP and MAIN have
their own unique functions in between the shared ones, so…
2015-03-14 23:25:50 +01:00