Commit Graph

5 Commits

Author SHA1 Message Date
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