Backporting this TH05 innovation to TH01. Dynamic far pointer
construction from the SEG_PLANE_* constants might be faster, but
definitely not smaller.
Also raises the question of how we organize the files during the long
time in which TH02-TH04 are not position-independent and thus still
need vram_planes_set() for building into identical binaries. Moving the
function definition up to TH02 is *kinda* unauthentic, but this branch
ultimately doesn't care.
Part of P0229, funded by Ember2528.
Code that serves no purpose in the original game, but would cause quite
the annoyance to other port developers who might not immediately
realize that this code is unused. Keeping some of the functions that
come in handy during debugging, though.
Part of P0229, funded by Ember2528.
Same rationale here – this naming scheme clarifies how these variables
are just redundant copies out of the resident structure.
Part of P0229, funded by Ember2528.
The `credit_` prefix may seem redundant within the REIIDEN.CFG
structure, but consistency seems more important here. Makes it much
easier to follow how these fields are copied around.
Part of P0229, funded by Ember2528.
In all places visited during the next 6 pushes: The resident structure
and copies of its values, the packfile implementation, boss entities,
rendering font ROM glyphs to VRAM, and overall inconsistent code
between the three binaries.
Part of P0229, funded by Ember2528.
And name the FM state in a way that already prepares modded PMD
support. That's the number 1 TH01 mod idea, after all.
Part of P0216, funded by JonathKane.
The nondescript nature of `core/` has been annoying me for a while, and
these function kind of are number-related after all.
Part of P0204, 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].
Might seem inconsistent, given that the function initializes pointers
that are declared in planar.h… but it's always called from other game
initialization functions that don't require pc98.h or planar.h.
Part of P0133, funded by [Anonymous].
With a type-safe wrapper template that removes the need for ID length
and structure-size-in-paragraphs macros. *And* <dos.h>!
Part of P0126, funded by [Anonymous] and Blue Bolt.
Which gets rid of 13 redundant translation units. Definitely a good
start, before I figure out how to best handle the more complicated
cases.
(Maintenance mode commit)
"Hey, let's have separate functions for uint16_t and int16_t… and then
just *not* support negative numbers in the latter" :zunpet:
Part of P0104, funded by Ember2528.