Commit Graph

9 Commits

Author SHA1 Message Date
nmlgc 9b28791c7f [Maintenance] [th03] Add a separate type for SPRITE16 sprite area offsets
Part of P0182, funded by Lmocinemod and [Anonymous].
2022-02-18 09:36:34 +01:00
nmlgc 99aee2bdbe [Maintenance] Consistently use singular for entity structure and file names
Not too sure about "chars" yet, with TH03 and all.

Part of P0168, funded by Blue Bolt and rosenrose.
2021-11-28 19:14:02 +01:00
nmlgc 15b4011ff2 [Maintenance] Remove inconsistent newlines before `extern "C"` braces
Part of P0168, funded by Blue Bolt and rosenrose.
2021-11-28 18:53:09 +01:00
nmlgc fb67d4d054 [Maintenance] Rename all old *_X and *_Y constants to *_LEFT and *_TOP
Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:14:22 +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 368f151759 [Maintenance] Declare distinct types for screen, VRAM, and TRAM coordinates
Whew, time to look at every `int` variable we ever declared! The best
moment to do this would have been a year ago, but well, better late
than never. No need to communicate that in comments anymore.

These shouldn't be used for widths, heights, or sprite-space
coordinates. Maybe we'll cover that another time, this commit is
already large enough.

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:30 +02:00
nmlgc d1f3dcd620 [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory
Adding op/, main/, and end/ directories does nicely cover a great
majority of the "not really further classifiable slices" implied in
d56bd45.

Part of P0086, funded by [Anonymous] and Blue Bolt.
2020-04-15 20:58:01 +02:00
nmlgc 0e19e52572 [Maintenance] Templatize RGB and palette types for 4- and 8-bit components
Right, PC-98 hardware only supports 4 bits per RGB component, for a
total of 4,096 possible colors. The 8-bit RGB color values we've been
seeing throughout the later games are a master.lib extension, to allow
for more toning precision. Which TH01, with all its NIH syndrome,
doesn't use.

And yup, that means templates in the most basic header files… Since
that would have meant renaming *everything* to compile as C++, I simply
made these types exclusive to C++ code, thcrap style.

Part of P0066, funded by Keyblade Wiedling Neko and Splashman.
2020-01-05 19:06:32 +01:00
nmlgc 5f4f5d87dc [Decompilation] [th03] Shot update and render functions
Meh, can't overload arithmetic operators that take a Subpixel without
generating a needless load and store, even with -Z. But heck, slightly
uglifying subpixel/subpixel arithmetic is exactly the right trade-off.

Completes P0061, funded by Touhou Patch Center.
2019-12-05 21:41:31 +01:00