Commit Graph

2 Commits

Author SHA1 Message Date
nmlgc b61e612fdf [Maintenance] #include each header's dependencies within the header itself
OK, this is the big one. We still keep using `#include` guards only
where we absolutely need to, but with each header now being valid in
isolation, this can now actually help *minimize* the length of each
translation unit's `#include` list. Turns out that after removing all
the duplicates, we only *actually* need to guard 29 headers across all
5 games.

Part of P0285, funded by [Anonymous] and iruleatgames.
2024-07-09 08:46:42 +02:00
nmlgc 3c0c6c7343 [Reverse-engineering] [th02] Sparks: Structure
First taste of how sprites are managed in this game. Expressing the
current and previous position in terms of the VRAM page is kind of
quirky, but not as bad as expected.

What *is* bad, however, is that the most natural next function is
undecompilable thanks to an inconsistent `LEAVE` instruction in its
epilog 🙄 And `codegen.hpp` has almost none of the instructions we
would need to hide the SI and DI registers from the compiler, and I'm
*really* not in the mood for another such mess anyway. I'd really like
to try patching these mistakes in a separate build step instead, but
unfortunately I'm out of research money as well. So let's go for
something else next.

Part of P0237, funded by Yanga.
2023-03-29 12:36:56 +02:00