It's easy to blame ASM micro-optimizations for bugs like these, but the
original C++ version from TH01 was equally bugged for FX_WEIGHT_BLACK.
Part of P0225, funded by Enderwolf, Blue Bolt, 32th System, and Yanga.
Even that part's the same in these three games… except for the 27 small
places where it isn't, 7 of which are purely coding style cosmetics.
Completes P0224, funded by Splashman and -Tom-.
The later games need this constant for their buffers as well, and it's
not just needed for loading sound files. Might be overkill to force all
of `master.hpp` to be #included in some additional places, but the
alternative would have been to move it to a `fn_len.hpp` file.
Ultimately, this constant *is* related to master.lib.
Part of P0223, funded by Blue Bolt and rosenrose.
These are more generally useful for general text width calculations
that don't necessarily involve TRAM.
Part of P0223, funded by Blue Bolt and rosenrose.
Since it also sets an activation flag, it does much more in context
than checking for a board. This name also highlights why OP.EXE and
FUUIN.EXE ignore the BGM mode specified in the option menu.
Part of P0216, funded by JonathKane.
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.
Turns out I've misread the execl() documentation. That function does in
fact *not* need a second `nullptr` parameter for envp, because it
doesn't pass envp.
Part of P0216, funded by JonathKane.
The only game to show an error message if you try directly launching a
game through its main executable without setting up sound drivers or
the resident structure, and a really good one at that. "Please start
from the batch file" is the most user-friendly sentence you could print
in that case.
Part of P0215, funded by Ember2528 and Yanga.
Hiding a lot of dynamic .PTN buffer size information behind misleading
labels. Nothing there to tell ZUN that he could have just easily saved
20% of all this memory by using a structure without an unneeded alpha
plane.
Completes P0214, funded by Ember2528.
Where ZUN forgets the trigonometry functions used everywhere else in
the game, attempts to implement a velocity calculation from scratch
instead, and fails in every way possible. Oh, and it also has an
out-of-bounds memory access…
Part of P0214, funded by Ember2528.
✅ Doing way too many things and thus being impossible to name
✅ 1 ZUN bug
✅ 1 ZUN quirk
Off to a final great start! 😵 Stupid one-off functions deserve stupid
names, Part 5. Oh well, only 30 functions to go…
Part of P0214, funded by Ember2528.
One disgusting abuse of this flag shouldn't ruin a perfectly adequate
variable name, and force a dependency on input variables on every
gameplay-related translation unit. Especially since the "ZUN bloat"
convention allows us to clearly highlight it.
Part of P0214, funded by Ember2528.
Yeah, no, I'm not going to declare all of those as `extern` and then
"Move all data to C land" after decompiling the entire segment. Once
again (94372d2), it's not too bad – heck, in REIIDEN.EXE, it's less
than a screen worth of identifiers that are still being referenced.
Part of P0214, funded by Ember2528.
The final secret of this executable: With a loaded MDRV2, enter
fuuin t1
on the DOS prompt to view the 魔界/Makai Good Ending, or
fuuin t
for the 地獄/Jigoku Good Ending.
(Bad Endings can only be accessed by pre-allocating the TH01 resident
structure and setting one of the `continues_per_scene` array members to
a nonzero value.)
Part of P0213, funded by Ember2528 and GhostRiderCog.