Commit Graph

16 Commits

Author SHA1 Message Date
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 a89836c18e [Decompilation] [th05] Bombs: Reimu's blue star animation
After ternary expressions straight out of Jigoku in 57be510, we now got
pointer arithmetic straight out of Jigoku… with, unsurprisingly, two
ZUN bugs.

Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:22:28 +02:00
nmlgc b034e606bc [Maintenance] Subpixels: Differentiate between pixel and subpixel types
Which does have the practical effect of communicating more information
via IntelliSense during regular development!

Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:14:21 +02:00
nmlgc 5a1e16de60 [Maintenance] Subpixels: Rename to_screen() to to_pixel()
We've been establishing `screen` as meaning "a coordinate rooted at the
top-left corner of the display", whereas most of the Subpixels in >TH01
are rooted at the top-left of the playfield.

Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:14:17 +02:00
nmlgc d6f634631f [Maintenance] Declare distinct types for pixel and VRAM sizes
Oh wait, we also need one of those for an upcoming structure!

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:33 +02:00
nmlgc 368f151759 [Maintenance] Declare distinct types for screen, VRAM, and TRAM coordinates
Whew, time to look at every `int` variable we ever declared! The best
moment to do this would have been a year ago, but well, better late
than never. No need to communicate that in comments anymore.

These shouldn't be used for widths, heights, or sprite-space
coordinates. Maybe we'll cover that another time, this commit is
already large enough.

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:30 +02:00
nmlgc 2ef3db3052 [Maintenance] Remove the `operator =` overloads for Subpixels
At least we've now documented their negative effects.

Part of P0110, funded by [Anonymous] and Blue Bolt.
2020-08-19 20:10:08 +02:00
nmlgc 7c4d31c02b [Decompilation] [th05] Line sets: Rendering
With all the memmove()-style shifting of individual lines, there's
probably a point to reserving 20 lines per set, but only ever rendering
4 of them. We'll see once I get to decompile all of these functions.

Part of P0110, funded by [Anonymous] and Blue Bolt.
2020-08-19 20:10:08 +02:00
nmlgc 60a700eeda [Maintenance] Declare the "no valid point" constant (-999) in a single place
Part of P0110, funded by [Anonymous] and Blue Bolt.
2020-08-19 19:32:37 +02:00
nmlgc 2fbde57631 [Maintenance] Turn the left/right/top/bottom area structure into a template
Part of P0109, funded by [Anonymous] and Blue Bolt.
2020-08-16 21:40:35 +02:00
nmlgc bc9b7cdfcd [Decompilation] [th01] Boss entities: Wavy blitting
Used for Elis' entrance animation. Including an unused unblitting +
blitting function – apparently, ZUN wrote that one before the sloppy
EGC-accelerated wavy unblitting function that I decompiled way back in
6d2fa9f.
Oh well, the latter one is fine in context, since there are no other
sprites on screen during the animation.

Part of P0108, funded by Yanga.
2020-08-12 18:01:33 +02:00
nmlgc ceb81db49c [Decompilation] [th01] Pellets: Spawn functions
Completes P0100, funded by Yanga.
2020-07-12 16:14:01 +02:00
nmlgc 2d0b4a5b06 [Maintenance] Add generic overlap test macros for collision detection
Part of P0099, funded by Ember2528.
2020-07-12 16:02:04 +02:00
nmlgc a207d6a494 [Decompilation] Add screen-space assignment overloads for Subpixels
Also great news for those people who want to remove any and all C++ in
their mods, because this forces us to spell out subpixel literals as
actual floats, every time. And with that, you're back to being able to
simply search-replace for all the instances you'll have to change.

Part of P0099, funded by Ember2528.
2020-07-12 16:00:59 +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 8f8940801d [Maintenance] Move the Subpixel class to TH01
At least pellets are moved at a decent precision in this game.

Part of P0099, funded by Ember2528.
2020-07-12 15:16:03 +02:00