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.
With the upcoming `#include` cleanup, it finally makes sense to split
off all graphics-related code into its own header. In turn, it makes
more sense to store all of these future master.lib headers in, well,
the master.lib directory, which provides a new 8 characters for their
file names. Turns out that the rationale I gave for the root directory
placement in 8266bbd didn't hold up 3½ years later…
(Also, the `pc98.h` declarations will eventually be split into
`game/coords.hpp` and something in `platform/x86real/pc98/`.)
Part of P0284, funded by [Anonymous] and Blue Bolt.
Compiling as many source files as possible within a single TCC process
is the single most important build time optimization we can do. Sadly,
it won't work with Tup's parallel nature, but it can really shine in a
dumb batch build. This is the reason why Windows 9x can compile this
entire codebase on a single core in half the time it takes MS-DOS
Player to do the same on 64-bit Windows, on the same hardware.
That weird double-spacing, however, is the most ridiculous workaround
for a bug I have seen in a long while…
Completes P0282, funded by [Anonymous].
`tup generate` does this as well, but only emits the `mkdir` calls for
the directories that are missing in the current working tree, requiring
a clean checkout to actually emit all necessary ones. This is much more
convenient.
Part of P0282, funded by [Anonymous].
The ones we use in `Research/` and for the Anniversary Edition. Better
code generation at the cost of having to explicitly declare `main` as
`__cdecl` so that the linker can find it.
Part of P0002, funded by GhostPhanom.
These are just as much of a part of the PC-98 Touhou build pipeline as
the sprite compiler. The future Tupfile will use the tupblocks concept
of treating the build configuration as a branching tree, so we'd like
everything under `Pipeline/` to share a single set of configuration
flags.
Part of P0002, funded by GhostPhanom.
Unfortunate, but we won't be able to reuse the same .OBJ file once we
compile all pipeline tools with the `pascal` calling convention.
Separately compiling `th01/formats/img_data.cpp` would also turn into a
mess with the upcoming `#include` cleanup:
• `img_data.cpp` requires `ptn.hpp`,
• which will require `egc.h`,
• which requires `defconv.h`,
• which requires `GAME` to be defined,
• which makes no sense for pipeline tools.
Part of P0002, funded by GhostPhanom.
This one will use the DotRect template from `planar.h` and generate a
single 16- or 32-dot value per row. Since this converter has a goal of
maximum portability, it makes sense to keep raw the multidimensional
C-style arrays around as a possible output format.
Part of P0205, funded by [Anonymous] and Yanga.
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].