Commit Graph

8 Commits

Author SHA1 Message Date
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 a4fb2cf067 [Maintenance] [th04/th05] Remove unnecessary segment splits
Reclaiming a few letters.

Part of P0258, funded by [Anonymous] and Blue Bolt.
2023-10-31 22:33:13 +01:00
nmlgc 08352a5a81 [Decompilation] [th04] Stage tiles: Setting single tiles / .STD: Load function
Word alignment forces us to decompile these two barely related things
in a single commit. The former is at least much better and saner than
its TH02 counterpart.

Completes P0241, funded by [Anonymous] and Blue Bolt.
2023-05-30 01:31:46 +02:00
nmlgc a5a1967367 [Reverse-engineering] [th02] Scrolling: Speed and interval
Part of P0235, funded by Ember2528.
2023-03-29 12:36:54 +02:00
nmlgc 4f853261fa [Decompilation] [th05] Stage 5 midboss: Rendering
15 lines of code, and still not quirk-free.

Completes P0225, funded by Enderwolf, Blue Bolt, 32th System, and Yanga.
2022-11-30 22:46:22 +01:00
nmlgc f3d59bc324 [Decompilation] [th04/th05] Applying VRAM scrolling to Y coordinates (segment 3)
… Wait, we *can* decompile functions with both parameters, no stack
frame, and a Pascal calling convention?! Good that I already forgot how
impossible it was to decompile the first function I looked at that fell
into this category!

Part of P0148, funded by [Anonymous].
2021-07-21 00:35:02 +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 5531ed9b8b [Maintenance] [th04/th05] Declare scrolling variables and functions in C land
Part of P0089, funded by [Anonymous] and Blue Bolt.
2020-05-04 00:03:51 +02:00