Commit Graph

9 Commits

Author SHA1 Message Date
nmlgc 04de2fddd9 [Decompilation] [th05] Bullets: Sprite selection by angle
And we're right back to dumb micro-optimizations.

Part of P0192, funded by [Anonymous], nrook, and -Tom-.
2022-05-01 00:22:04 +02:00
nmlgc 07b956b3ad [Maintenance] [th04/th05] Move bullet code into dedicated segments
Too bad that alignment constraints do in fact force us to compile
th04/bullet_u.cpp and th04/bullet_a.cpp separately. 😕

Part of P0184, funded by -Tom-.
2022-03-05 15:31:50 +01:00
nmlgc 24219dc897 [Reverse-engineering] [th04/th05] Bullets: Parameters for special motion types
Not just the maximum bounce count. Unsurprisingly, I also did a rather
shallow job in this part of the bullet code back in 2020…

Part of P0184, funded by -Tom-.
2022-02-28 22:13:06 +01:00
nmlgc f005eb023b [Maintenance] Remove all unused externs in ASM land
Part of P0158, funded by Yanga.
2021-09-28 18:05:24 +02:00
nmlgc b0a2621296 [Reverse-engineering] [th05] Bullets: Spawn function (undecompilable)
Reason: Self-modifying. -.- And saving SI and DI on the stack way too
late.
Luckily, it's mostly identical to TH04's version I decompiled earlier,
only (thankfully) combining regular and special bullets into one
function, and integrating TH05-specific improvements.

Part of P0152, funded by -Tom- and [Anonymous].
2021-07-31 20:19:33 +02:00
nmlgc 9ff0033a0c [Reverse-engineering] [th05] Bullets: Far wrapper for regular bullet spawning
Only used for the revenge bullets fired from Stage 3 Alice's barrier.
Not worth creating a separate translation unit, especially since the
function above is undecompilable as well…

Part of P0152, funded by -Tom- and [Anonymous].
2021-07-31 20:19:33 +02:00
nmlgc f3d59bc324 [Decompilation] [th04/th05] Applying VRAM scrolling to Y coordinates (segment 3)
… Wait, we *can* decompile functions with both parameters, no stack
frame, and a Pascal calling convention?! Good that I already forgot how
impossible it was to decompile the first function I looked at that fell
into this category!

Part of P0148, funded by [Anonymous].
2021-07-21 00:35:02 +02:00
nmlgc 8a5a9accd6 [Maintenance] Rename pellet/bullet "patterns" to "groups"
We're going to need some name for the longer, boss-specific danmaku
animations. Turns out that these are exactly called "patterns" in
Sparen's glossary:

	https://sparen.github.io/ph3tutorials/ddsg0.html#sub4

So what we called a "pattern" is actually called a "group". Whoops!

Part of P0142, funded by Yanga.
2021-05-27 20:21:09 +02:00
nmlgc 4f7a3a28c3 [Reverse-engineering] [th05] Difficulty- and rank-based bullet pattern tuning
If C allowed labels of other functions as `goto` targets, this *might*
have been decompilable into something useful to modders. But like this,
there's no point in even trying.

Yeah, you *really* don't want to base your fangame mod on TH05.

Part of P0109, funded by [Anonymous] and Blue Bolt.
2020-08-16 21:40:33 +02:00