Commit Graph

5 Commits

Author SHA1 Message Date
nmlgc 0b06980360 [Maintenance] Hidden #include dependency removal: TH03
Part of P0284, funded by [Anonymous] and Blue Bolt.
2024-07-09 08:42:21 +02:00
nmlgc 110d0534ed [Maintenance] Move `extern "C"` into the headers it applies to
The translation units were probably a better place back when most of
the codebase was still compiled in C mode, we only had a few C++ TUs,
almost everything needed to be declared as `extern "C"`, and moving
these declarations into the headers would have been really noisy with
all the `#ifdef __cplusplus` / `#endif` required. Nowadays though,
we've greatly reduced that surface area. And given that headers will
include even more headers as part of the upcoming `#include` cleanup,
it makes sense to make the jump now.

Part of P0284, funded by [Anonymous] and Blue Bolt.
2024-07-09 08:40:49 +02:00
nmlgc cdc7e5929a [Decompilation] [th03] SPRITE16: Inline methods for playfield clipping
Part of P0280, funded by [Anonymous], Blue Bolt, and JonathKane.
2024-04-21 13:49:37 +02:00
nmlgc 51de5ec036 [Decompilation] [th03] SPRITE16: Inline method for sprite size assignments
All but one of the writes to these globals follow the consistent scheme
of assigning hardcoded literals to first `w` and then `h`, so it makes
sense to encapsulate the conversion from display-space pixels to VRAM
words and heights in a method.
(On that note, we also need a new type to encode the notion of
VRAM-space heights as opposed to the display-space heights of
`pixel_t`.)

Part of P0280, funded by [Anonymous], Blue Bolt, and JonathKane.
2024-04-21 13:41:58 +02:00
nmlgc 415bef1176 [Maintenance] [th03] SPRITE16: Move game-level code into `main/`
We'd like t have a method to set the clipping coordinates from a player
ID, but such a method requires a dependency on `playfld.hpp` in `main`.
`SPF_DOWNWARDS_COLUMN` is kind of game-specific to begin with, too.

Part of P0280, funded by [Anonymous], Blue Bolt, and JonathKane.
2024-04-21 13:36:03 +02:00