Commit Graph

14 Commits

Author SHA1 Message Date
nmlgc 18e755d99b [Decompilation] [th04] Bullets: Regular spawn function
Part of P0150, funded by Blue Bolt.
2021-07-31 20:19:32 +02:00
nmlgc 2c52bb5ef3 [Decompilation] [th04] Bullets: Velocity and angle calculation
`switch` statements compiling to binary searches if the range of values
is nasty enough? That's so cool. Apart from a few places in TH02,
this is the only place in PC-98 Touhou to show off that Turbo C++
optimization.

That code's still unexpectedly janky for what you'd expect from the 4th
game in the series, though.

Part of P0150, funded by Blue Bolt.
2021-07-31 16:15:32 +02:00
nmlgc 48c67d5e14 [Decompilation] [th04/th05] Common transformations from playfield space to VRAM
… quite some readability improvements in this regard.

Part of P0149, funded by Blue Bolt, Ember2528, and -Tom-.
2021-07-31 09:33:50 +02:00
nmlgc db05bffca3 [Maintenance] Turn motion_t into a template
motion_t is also used for certain animations in MAINE.EXE, so not all
instances refer to entities in playfield space. Explicitly specifying
the latter now allows us to gain…

Part of P0149, funded by Blue Bolt, Ember2528, and -Tom-.
2021-07-31 09:33:50 +02:00
nmlgc c940059037 [Decompilation] [th05] Shinki + EX-Alice: Background rendering
Palette hacks not included yet. Yup, that's how all phases can use
hardware color #0 as their background color.

Completes P0147, funded by -Tom- and Ember2528.
2021-06-21 15:48:42 +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 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 ceb81db49c [Decompilation] [th01] Pellets: Spawn functions
Completes P0100, funded by Yanga.
2020-07-12 16:14:01 +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 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