Commit Graph

6 Commits

Author SHA1 Message Date
nmlgc 403fbcc37f [Maintenance] Remove `extern "C"` from more areas of decompiled code
Most notably from `th01/core/str_val`, where it's really in the way.
That mistake will haunt me until this all is done, probably…

Part of P0158, funded by Yanga.
2021-09-28 18:05:24 +02:00
nmlgc cf356bbf5e [Maintenance] [th01] Start a new header for commonly used VRAM color indices
Part of P0158, funded by Yanga.
2021-09-28 18:05:24 +02:00
nmlgc 1c5ed4b06e [Maintenance] Copy <dos.h>'s 16-bit x86 Real Mode declarations to a new file
DOS is not the same thing as the underlying CPU, after all. A separate
file not only indicates to future port authors which parts of the code
are x86-specific, but it also speeds up build times…

… in theory, because removing 677 lines from 49 files each doesn't seem
to speed up the build as much as I had hoped? But apparently my whole
system mysteriously got faster in the meantime, and I was getting 22-23
seconds for the entire repo even before this commit. Good enough.

Part of P0134, funded by [Anonymous].
2021-02-20 23:49:45 +01:00
nmlgc dc9e3ee475 [Decompilation] [th01] Bosses: Collision handling
Functions with 12 parameters are hard to describe, y'know. Looking
forward to decompiling these giant expressions for the actual
boss↔orb collision parameter passed to this function…

Oh well, at least we're now totally ready for some boss code next
year. 😌

Completes P0131, funded by Yanga.
2020-12-18 01:38:52 +01:00
nmlgc 576def5293 [Decompilation] [th01] HUD: Blitting individual hit points
Nice GRCG use! The 8 dots of its tile register, which are commonly just
set to the same color value, can of course hold an arbitrary bit
pattern for every bitplane. This allows you to get different colors for
every pixel, with still just a single VRAM write of the alpha mask to
one bitplane.

And I thought TH01 only suffered the drawbacks of PC-98 hardware, and
made so little use of its actual features that it's perhaps not even
fair to call it "a PC-98 game"…

Completes P0130, funded by Yanga.
2020-12-18 01:38:48 +01:00
nmlgc b4d500b2de [Decompilation] [th01] Bosses: Generic no-op callback
Made truly generic by its use in both the upcoming boss collision
handling, as well as some SinGyoku pellet spawning function.

Part of P0130, funded by Yanga.
2020-12-18 01:38:46 +01:00