Commit Graph

8 Commits

Author SHA1 Message Date
nmlgc 4d3d6acd28 [Decompilation] Templatize subpixels to offer both 16-bit and 8-bit variants
Yup, TH03 actually uses a 4.4 fixed-point format.

Part of P0061, funded by Touhou Patch Center.
2019-12-05 21:27:53 +01:00
nmlgc bb6b0f1cc3 [Maintenance] Move the Subpixel class to a separate header, under TH03
Part of P0061, funded by Touhou Patch Center.
2019-12-05 21:21:56 +01:00
nmlgc 8b627803a3 [Position independence] Vector calls and variables
Raw, uninteresting position independence work. Or maybe not, given that
this was one of the few things that also apply to TH01, and reveal just
how chaotically this game was coded. And so we've got three ways that
ZUN stored regular 2D points: Regularly (X first, Y second), Y first
and X second, and multiple points stored in a structure of arrays…

Completes P0059, funded by [Anonymous] and -Tom-.
2019-11-18 22:24:24 +01:00
nmlgc db4de240e9 [Decompilation] Prepare the C side for the shot type control functions
That should make this convoluted copypasta a bit easier to read. And
sure, I could have done something about the loop as well, but
SHOT_FUNC_INIT already hides enough control flow behind a macro…

Part of P0037, funded by zorg.
2019-10-14 23:42:20 +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 39c169c30d [Reduction] Separate functions for 1D and 2D vector construction
Look at that TH05 vector2_at_opt function. What the hell, the caller is
supposed to set up the stack frame for the function? How do you even get
a compiler to do this (and no, I haven't found a compiler switch)? No
way around writing a separate "optimizer" as part of the compilation
pipeline, it seems.
2017-01-08 21:01:13 +01:00