Commit Graph

7 Commits

Author SHA1 Message Date
nmlgc b61e612fdf [Maintenance] #include each header's dependencies within the header itself
OK, this is the big one. We still keep using `#include` guards only
where we absolutely need to, but with each header now being valid in
isolation, this can now actually help *minimize* the length of each
translation unit's `#include` list. Turns out that after removing all
the duplicates, we only *actually* need to guard 29 headers across all
5 games.

Part of P0285, funded by [Anonymous] and iruleatgames.
2024-07-09 08:46:42 +02:00
nmlgc 0ffa756cae [Contributing] Decide on `seg` and `off` for x86-segment-related identifiers
I could have equally argued the opposite way, and in favor of `sgm` and
`ofs`, but I've also been using `seg` and `off` more prevalently
throughout the years.

Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
2023-06-30 19:59:11 +02:00
nmlgc bb42f673e9 [Decompilation] [th05] Lasers: Collision detection
Started out with the usual amount of decompilation workarounds for this
low-level laser code, but ended up requiring one on almost every line
just because ZUN reversed the function prolog… 🙄

Part of P0228, funded by [Anonymous] and nrook.
2023-01-17 11:58:17 +01:00
nmlgc 15a047fc74 [Decompilation] [th05] Lasers: Ray rendering
A year ago, I would have considered this undecompilable. Turns out that
this function really benefitted from a decompilation against all odds,
especially with these 4 different views on the same 8 local variables.

Part of P0228, funded by [Anonymous] and nrook.
2023-01-17 11:53:47 +01:00
nmlgc b989076579 [Decompilation] [th05] Lasers: Line construction
Part of P0228, funded by [Anonymous] and nrook.
2023-01-17 11:47:01 +01:00
nmlgc ee58546025 [Decompilation] [th05] Lasers: 2D vector construction
More custom code generation!

Part of P0228, funded by [Anonymous] and nrook.
2023-01-17 11:46:25 +01:00
nmlgc bfd24c6ae3 [Decompilation] Turn the FS/GS prefix workaround into a full-on code generator
If we double down on this concept by defining all needed prefix and R/M
opcodes, the code turns out much simpler if we __emit__() even the
basic, non-broken case. And if the inlined functions directly take
the opcode bytes as parameters, we don't even need templates.

Completes P0227, funded by nrook.
2023-01-17 11:40:36 +01:00