Commit Graph

24 Commits

Author SHA1 Message Date
nmlgc 354a4724f3 [Decompilation] [th04/th05] Bosses: Defeat sequence
With TH04's version hardcoding not only Gengetsu's dialog and
initialization, but also the Bad Ending after having clearing Stage 5
with continues or on Easy difficulty.

Part of P0188, funded by [Anonymous] and nrook.
2022-03-27 01:35:37 +01:00
nmlgc 9ae4f7726e [Decompilation] [th05] EMS / Dialog: Face loading and rendering
Aha! TH05 actually loads every single rendered dialog image
individually before rendering it, either from the EMS area or disk.
That's one way to save memory, I guess?

Part of P0169, funded by Blue Bolt.
2021-11-29 02:01:10 +01:00
nmlgc 8b046dad0f [Decompilation] [th04/th05] EMS: Rendering the eyecatch image
Copied in from EMS memory if available.

Completes P0168, funded by Blue Bolt and rosenrose.
2021-11-29 02:01:01 +01:00
nmlgc bd77463f59 [Decompilation] [th05] EMS: Preloading boss facesets
Oh, an EMS function that does one single thing, and is not potentially
bugged within TH05's original sprite limits?! (Although that last part
might have just been a happy accident.)

Part of P0168, funded by Blue Bolt and rosenrose.
2021-11-29 02:00:58 +01:00
nmlgc fe33d49e0a [Decompilation] [th04/th05] EMS: Allocation + Preloading the eyecatch image
No, I'm not copying exactly what was on ZUN's monitor during the 2010
MAG・ネット documentary. Also, this one was very lucky not to receive
a stupid function name.

Part of P0168, funded by Blue Bolt and rosenrose.
2021-11-29 01:53:43 +01:00
nmlgc ccca7bf6ee [Reverse-engineering] [th04/th05] EMS: Cache area layout
Part of P0168, funded by Blue Bolt and rosenrose.
2021-11-29 01:53:13 +01:00
nmlgc 4d24ca53bd [Decompilation] [th04/th05] Bullets: Update function
… (24 + (difficulty * 8) + rank) in TH04, and (42 + (difficulty * 8))
in TH05. Also, TH05 only doesn't have TH04's bullet zap animation
because ZUN didn't consistently use constants…

Completes P0151, funded by Blue Bolt and -Tom-.
2021-07-31 20:19:33 +02:00
nmlgc 75c4f2d3cc [Reverse-engineering] [th04/th05] Bullets: Distinguish clear and zap mechanics
And actually document them correctly.

Clear: Custom duration, awards constant points per bullet during the
       entire duration, plays a decay animation
  Zap: Fixed duration, awards a semi-exponential bonus for all bullets
       alive on the first frame, plays a, um, "zapping" animation… in
       TH04, because it's bugged in TH05 :zunpet:

Part of P0149, funded by Blue Bolt, Ember2528, and -Tom-.
2021-07-31 09:33:35 +02:00
nmlgc a157739665 [Reverse-engineering] [th04/th05] .CDG slot IDs for MAIN.EXE
64 slots reserved, 16 slots actually used, another 768 bytes of
conventional RAM wasted…

(And yes, that naming convention is indeed meant as a shoutout to all
the RPG Maker veterans out there.)

Part of P0147, funded by -Tom- and Ember2528.
2021-06-21 15:48:41 +02:00
nmlgc 056b1c77c1 [Decompilation] [th04] Player character and shot type selection menu
Significantly more complex than the single menu in TH05!

Completes P0124, funded by [Anonymous] and Blue Bolt.
2020-11-02 22:41:51 +01:00
nmlgc 88cc266a24 [Maintenance] [th04/th05] Put global and stage-specific patnums into one enum
Right, because you'd also want to automatically shift the IDs for every
stage-specific sprite if you add or remove a new stage-independent one.

Part of P0109, funded by [Anonymous] and Blue Bolt.
2020-08-16 21:40:35 +02:00
nmlgc 1799d67782 [Build] Convert all known hardcoded sprites during the 32-bit build part
You can now mod them by simply editing .BMP files!
2020-07-09 22:28:15 +02:00
nmlgc c9eef45724 [Maintenance] Fix inconsistencies in sprite declarations 2020-07-09 22:28:14 +02:00
nmlgc ed4d7282a0 [Pipeline] Add .BMP versions of all hardcoded 1bpp sprites found so far
A future sprite converter (documented in #8) could then convert these
to C or ASM arrays.

(Except for the piano sprites for TH05's Music Room, which are stored
and used in such a compressed way that it defeats the purpose of
storing them as bitmaps.
2020-06-21 23:03:45 +02:00
nmlgc 97dce75446 [Maintenance] Proofread all comments in C land 2020-06-21 22:14:08 +02:00
nmlgc da6b856dc5 [Reverse-engineering] [th04/th05] Stage enemy structure
Last one of the shared entity types! The TH05 version of the .STD enemy
VM would now be ready for decompilation in one single future push.

Completes P0088, funded by -Tom-.
2020-05-03 23:21:30 +02:00
nmlgc ba66fcc801 [Reverse-engineering] [th04/th05] Currently alive player shots
Copying out the shot position might have actually been a decent
optimization for hit detection, to avoid the indirection if the shot
is not colliding with anything.

Part of P0088, funded by -Tom-.
2020-05-03 23:18:56 +02:00
nmlgc b6fdcb0013 [Maintenance] Start a separate file for recurring sprite blitting algorithms
Part of P0087, funded by -Tom-.
2020-04-15 21:34:21 +02:00
nmlgc 8f824c4297 [Reverse-engineering] [th02/th04/th05] Point numeral sprites
Part of P0087, funded by -Tom-.
2020-04-15 21:34:21 +02:00
nmlgc 117fa02525 [Reverse-engineering] [th04] Stage 6 Yuuka's parasol and vanishing animations
Yes, this is the best time to cover these, since Stage 6 Yuuka's
animation state is reset in a variety of the boss phase end functions…

Part of P0086, funded by [Anonymous] and Blue Bolt.
2020-04-15 21:34:18 +02:00
nmlgc 65816a43db [Reverse-engineering] [th02/th04/th05] Pellet rendering
… which allows a split into first rendering the top part of every
pellet, then the bottom part. This way, the game only needs two
grcg_setcolor() calls for any number of pellets.

Part of P0085, funded by -Tom-.
2020-04-03 17:32:51 +02:00
nmlgc 4843d17aae [Reverse-engineering] [th02/th04/th05] Hardcoded 8×8 pellet sprites
The bottom gray part of pellets in TH04 and TH05 is actually a separate
8×4 sprite…

Part of P0085, funded by -Tom-.
2020-04-03 17:32:50 +02:00
nmlgc eb0cf6820f [Reverse-engineering] [th04/th05] Bullet-related sprite IDs
IDs based on Maribel Hearn's jargon page
(https://maribelhearn.com/jargon) as well as Sparen's Danmaku Design
Guide (https://sparen.github.io/ph3tutorials/ddsga1.html#sub2).

Part of P0074, funded by Myles.
2020-02-16 21:44:51 +01:00
nmlgc d6f356da45 [Maintenance] Use a single per-game, per-binary file for super_*() patnum IDs
Since they're determined by the order of sprites in a .BFT file,
they're best auto-generated by an enum as much as possible.

Part of P0074, funded by Myles.
2020-02-16 21:43:08 +01:00