Commit Graph

16 Commits

Author SHA1 Message Date
nmlgc 50c498a549 [Reverse-engineering] [th01] Shootout lasers: Hardcoded sprites
First ZUN bug in sprite preshifting! One wrongly shifted pixel means
that we can't use the auto-preshift feature of our sprite converter -.-

Also, why did these even have to be hardcoded sprites to begin with.
These dot patterns could have been easily generated procedurally… but
even *that* wouldn't have been necessary, given that there's this nice
function called, uh, graph_r_line_patterned()? Which could have
rendered all of the lasers in the upcoming class and more?

Part of P0122, funded by Yanga.
2020-10-06 13:52:22 +02:00
nmlgc 1184f6c671 [Decompilation] [th01] Interleaving both VRAM pages in an 8×8 square
Some of the unused interleave masks are not that straightforward, so it
makes sense to have all of them as a bitmap. I'm positive that this
sort of thing could have been EGC-accelerated… although, simply
writing better C would probably already go a long way.

Part of P0121, funded by Yanga.
2020-09-28 13:09:49 +02:00
nmlgc 3c008b6a4f [Decompilation] [th01] Invincibility sprite blitting
In which ZUN accidentally the GRCG rather than the EGC in what should
have been (?) the unblitting function. Which then ends up actually
blitting yet another randomly background-masked version of the same
sprite on top of the old one. And after just a few frames, you get
those fully filled red diamonds you don't see in the sprite sheet.

Then again, if the 16w×h rectangle unblitting function is all you
have, and you can't be bothered to actually learn the EGC, this *is*
the better option 🎺

Completes P0120, funded by Yanga.
2020-09-28 12:56:05 +02:00
nmlgc 11b776b32e [Decompilation] [th01] 8×8 diamond, star, and snowflake sprite blitting
More hardcoded sprites! These are prominently seen in the Konngara,
Elis, and Sariel battles, respectively.

Completes P0105, funded by Yanga.
2020-08-12 16:24:04 +02:00
nmlgc 3622eb6298 [Decompilation] [th01] HUD: Stage number rendering
Completes P0104, funded by Ember2528.
2020-07-27 17:23:06 +02:00
nmlgc a0215ea85c [Decompilation] [th01] HUD: Life and bomb count rendering
If you've ever cheated more than 6 lives in TH01, you might have
noticed that those additional lives appear in additional rows in the
HUD. And well, that had to be coded somewhere…

Part of P0104, funded by Ember2528.
2020-07-27 17:20:29 +02:00
nmlgc e0bcdafb00 [Maintenance] [th01] Declare proper IDs for all .PTN sprites seen so far
Part of P0104, funded by Ember2528.
2020-07-27 17:19:48 +02:00
nmlgc b9038be04d [Decompilation] [th01] HUD: Current score and card combo rendering
Part of P0103, funded by Ember2528.
2020-07-27 17:13:35 +02:00
nmlgc b73762ba12 [Decompilation] [th01] HUD: Maximum card combo rendering
Nice and consistent…

Part of P0103, funded by Ember2528.
2020-07-27 17:12:21 +02:00
nmlgc f92c2a637c [Decompilation] [th01] HUD: High score update/render function
The scores are rendered to *both* VRAM pages…? Which means that we
need a separate set of sprites to store the background behind the
numbers. This does not bode well for animated backgrounds…

Part of P0103, funded by Ember2528.
2020-07-27 17:11:43 +02:00
nmlgc 5735c1622e [Decompilation] [th01] Pellets: Reset and decay functions
Or, in more relevant news: That's the function that forced TH01's
pellet sprites to be defined in C land. First sprite to make that jump.

Part of P0102, funded by Yanga.
2020-07-12 16:34:16 +02:00
nmlgc 3e3129567c [Decompilation] [th01] Pellet delay cloud blitting and unblitting
And immediately, we discover another two hardcoded sprites, with, of
course, another set of functions for blitting and unblitting them…

Part of P0099, funded by Ember2528.
2020-07-12 15:15:05 +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 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 dd89843fae [Decompilation] [th01] Pellet rendering
So even TH01 wasn't 100% C++ after all. Turns out that this function
was the only instance in all of REIIDEN.EXE where ReC98 previously had
different encodings for identical x86 instructions.

Part of P0096, funded by Ember2528.
2020-06-13 21:11:53 +02:00
nmlgc 94dc9ef251 [Maintenance] Move the pellet sprite to TH01
That's where it actually originated.

Part of P0096, funded by Ember2528.
2020-06-12 21:49:16 +02:00