Commit Graph

48 Commits

Author SHA1 Message Date
nmlgc e4ff9dae97 [Maintenance] Cutscenes: Centrally define picture coordinates
Part of P0278, funded by Yanga.
2024-04-12 00:29:09 +02:00
nmlgc 2480c76a56 [Naming] [th04/th05] MAINE.EXE: Top-level menu and scene functions
Also formalizing the `*_menu()` naming convention I've been following
for a while.

Part of P0265, funded by [Anonymous] and iruleatgames.
2024-02-03 08:59:48 +01:00
nmlgc 8943b52167 [Maintenance] Introduce types for VRAM colors and their components
Finally differentiating between colors and columns at least at the type
level.

Part of P0245, funded by [Anonymous], Blue Bolt, Ember2528, and Yanga.
2023-06-30 19:59:11 +02:00
nmlgc 308b6bcd2c [Maintenance] [th01] Endings: Reclassify the ドカーン image tearing issue as a bug
And explicitly define observability in terms of an infinitely fast
PC-98. That's the only reasonable assumption to make when considering
ports to faster architectures that aren't bottlenecked by disappointing
blitter chips.

Part of P0239, funded by Ember2528.
2023-04-30 17:12:47 +02:00
nmlgc 45c9e71533 [Maintenance] Fix another bunch of accumulated typos and dead code
Part of P0239, funded by Ember2528.
2023-04-28 22:21:21 +02:00
nmlgc c22299e0c8 [Contributing] Introduce a new "ZUN landmine" label for invisible bugs
Thanks to Clerish for the naming inspiration:

	https://twitter.com/Clerish/status/1623990678937034752

Part of P0231, funded by [Anonymous].
2023-02-28 08:08:10 +01:00
nmlgc 010d6ae918 [Maintenance] [th01] Interpret redundant resident structure copies as such
And dissolve the "vars" units, which would be too annoying to merge on
the `debloated` branch otherwise. This interpretation of these globals
further highlights the type differences between REIIDEN.EXE and
FUUIN.EXE.
Placing them in directly in `resident.hpp`; on the `debloated` branch,
we could neatly define each of these fields in a matching .cpp file,
but that file would need to be compiled twice due to the aforementioned
differences between binaries. Better to keep those in `op_01.cpp`,
`main_01.cpp`, or `fuuin_01.cpp`, respectively.

Part of P0229, funded by Ember2528.
2023-02-28 08:07:52 +01:00
nmlgc 8e24c92bd9 [Maintenance] [th01] High Score menu: Consistently use the ENDM_A.GRP constant
Part of P0229, funded by Ember2528.
2023-02-28 08:07:52 +01:00
nmlgc e0e9741f92 [Naming] [th01] Use a consistent `credit_` prefix for starting lives
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.
2023-02-28 08:07:52 +01:00
nmlgc 4716948b57 [Maintenance] [th01] Declare types for signed and unsigned scores
Will make it much easier for modders to resolve this inconsistency.

Part of P0229, funded by Ember2528.
2023-02-28 08:07:52 +01:00
nmlgc 24c07c72df [Maintenance] [th01] Replace generic C types with more specific ones
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.
2023-02-28 08:07:52 +01:00
nmlgc 9b46ff7d99 [Maintenance] [th01] Move TH01-exclusive VRAM text functions to a new header
Neatly dissolves two of the three game-specific preprocessor branches
in `th01/hardware/grppsafx.h`. Moving at least one function into a
corresponding .cpp file will also simplify the corresponding debloating
commit on the respective branch.

Part of P0229, funded by Ember2528.
2023-02-28 08:07:52 +01:00
nmlgc ab7dbf0462 [Decompilation] [th01] OP.EXE: Move the final pieces of data to C land
100%.

Part of P0216, funded by JonathKane.
2022-08-16 01:54:03 +02:00
nmlgc 47cd413064 [Maintenance] Reclassify previously labeled ZUN bugs as quirks where applicable
Part of P0216, funded by JonathKane.
2022-08-16 01:44:16 +02:00
nmlgc 650c1e3364 [Maintenance] Review any redundancies and label them as ZUN bloat
Or quirk, in the case of the slow TH01 ending picture blitting.

Part of P0216, funded by JonathKane.
2022-08-16 01:43:14 +02:00
nmlgc c4302b4ab7 [Maintenance] [th01] #include common.h from the resident structure header
Part of P0216, funded by JonathKane.
2022-08-16 01:41:14 +02:00
nmlgc 690b4df14b [Maintenance] Fix another bunch of accumulated typos and dead code
Part of P0216, funded by JonathKane.
2022-08-16 01:38:12 +02:00
nmlgc cf95cc8717 [Maintenance] [th01] Remove `extern "C"` from all remaining areas of code
Nothing says "we're getting things done" quite as much as this.

Part of P0214, funded by Ember2528.
2022-08-14 23:03:15 +02:00
nmlgc 1fd32fad0f [Decompilation] [th01] FUUIN.EXE: Move the final pieces of data to C land
100%.

Part of P0213, funded by Ember2528 and GhostRiderCog.
2022-08-11 23:21:23 +02:00
nmlgc 79e9ab77dc [Maintenance] Simplify EGC macros and hardcode the chip's register size
No reason to continue pretending it supports anything else.

Part of P0212, funded by GhostRiderCog, Lmocinemod, and LeyDud.
2022-08-11 18:03:44 +02:00
nmlgc 60a7e44b53 [Maintenance] Introduce proper Shift-JIS and JIS X 0208 types
Much more semantic than that twobyte_t abomination.

Part of P0212, funded by GhostRiderCog, Lmocinemod, and LeyDud.
2022-08-11 15:53:13 +02:00
nmlgc e4124ca004 [Maintenance] [th01] Move REYHI*.DAT declarations to the formats/ subdirectory
Part of P0212, funded by GhostRiderCog, Lmocinemod, and LeyDud.
2022-08-11 15:52:41 +02:00
nmlgc d398a949fc [Decompilation] High score menu: Move all data to C land
Completes P0211, funded by Lmocinemod and Arandui.
2022-08-08 20:16:29 +02:00
nmlgc 6e36dfd93b [Decompilation] [th01] Verdict screen: Move all data to C land
Part of P0211, funded by Lmocinemod and Arandui.
2022-08-08 20:16:25 +02:00
nmlgc 64fe9bbff9 [Decompilation] [th01] Endings: Common beginning
Part of P0211, funded by Lmocinemod and Arandui.
2022-08-08 20:16:21 +02:00
nmlgc 001033d15a [Maintenance] [th01] Remove `extern "C"` from more areas of code
The .GRC and .GRP functions, to be specific.

Part of P0203, funded by [Anonymous] and GhostRiderCog.
2022-07-10 13:09:12 +02:00
nmlgc 67e46b5e33 [Research] [th01] Find out why the ドカーン ending image is even visible at all
No frame delay after its blitting call, immediately overwritten on the
next iteration… but if EGC "acceleration" leads to 8000 VRAM page
switches, you don't need additional delay for parts of the image to
remain visible after all.

Part of P0200, funded by Yanga.
2022-06-17 15:30:30 +02:00
nmlgc bfdb1e33f4 [Decompilation] [th01] Endings: Bad
Part of P0200, funded by Yanga.
2022-06-17 15:30:30 +02:00
nmlgc cfb0b5f21b [Decompilation] [th01] Endings: Good
100 functions remaining in all of TH01!

Part of P0200, funded by Yanga.
2022-06-17 15:30:30 +02:00
nmlgc f1dbf5f13f [Decompilation] [th01] Endings: Boss slideshow
Alignment hacks! Alignment hacks everywhere.
(The translation unit layout workarounds are temporary, at least.)

Part of P0200, funded by Yanga.
2022-06-17 15:30:30 +02:00
nmlgc 7bdf35a22b [Maintenance] [th01] Remove `extern "C"` from more areas of code
The .BOS freeing funtions, others that are close to them in the typical
#include order, and the ending picture functions.

Part of P0198, funded by Lmocinemod and Ember2528.
2022-06-16 22:51:07 +02:00
nmlgc 16aba1bc9a [Readme] Update branch overview
Adding `th01_critical_fixes`, which has also become a part of
`community_choice_fixes`.
2022-06-01 02:27:52 +02:00
nmlgc 48db0b7a72 [Decompilation] [th01] Verdict screen: Title calculation
You can definitely make an argument that these if/else if branches are
easier to read than their implied formula, especially with all
variables being signed here.

Completes P0197, funded by Yanga and Ember2528.
2022-06-01 02:27:52 +02:00
nmlgc 2863a69836 [Decompilation] [th01] Verdict screen: Main function
Part of P0197, funded by Yanga and Ember2528.
2022-06-01 02:27:52 +02:00
nmlgc e15942bb7c [Maintenance] [th01] Add string length calculation wrappers for VRAM typing
Part of P0197, funded by Yanga and Ember2528.
2022-05-31 23:39:34 +02:00
nmlgc 94372d2e27 [Maintenance] [th01] Move data of FUUIN.EXE segments ≥4 to a new assembly unit
Turns out that the "new idea" for handling these data slices won't work
out in reality. At least the amount of necessary manual `extern`
declarations isn't soul-crushingly large, so this way isn't bad either,
after all!

Part of P0197, funded by Yanga and Ember2528.
2022-05-31 23:39:34 +02:00
nmlgc a2358bef47 [Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp`
One of those per delivery now, eh?

Part of P0189, funded by Arandui and Lmocinemod.
2022-04-16 23:53:46 +02:00
nmlgc 29abdd5b6a [Maintenance] Make decomp.h exclusive to C++
eeb4e7e changed the final C translation unit that used this header to
C++, and we got some more helpful inline functions upcoming.

Part of P0136, funded by [Anonymous].
2021-03-20 02:17:08 +01:00
nmlgc 1610d7b63d [Maintenance] Decide on a consistent place for file-wide `#pragma`s
(Maintenance mode commit)
2020-10-01 16:35:56 +02:00
nmlgc 1801e29cb3 [Maintenance] Rename the EGC implementation files a bit
Part of P0121, funded by Yanga.
2020-09-28 13:06:11 +02:00
nmlgc b974c1a915 [Maintenance] Add separate macros for GRCG/EGC-accelerated reads and writes
Not only getting rid of the "useless" (and thankfully, consistent)
bitplane parameter, but also allowing those shortened macros to be
redefined for the upcoming little ZUN inconsistency.

Part of P0120, funded by Yanga.
2020-09-28 12:51:01 +02:00
nmlgc ba29539fc7 [Maintenance] Declare a distinct type for VRAM offsets
… and this one, while I'm at it. I've been using pretty much every
possible type for VRAM offset variables, depending on my mood that day,
since signedness apparently never matters for those.
Except that it does. And so, just like with most of our high-level
types, we also have to account for ZUN's little signedness
inconsistencies here. Oh well, at least it's now only one of two types,
and there's no need to choose between `int` or `unsigned int` or
`short` or `unsigned short` or `int16_t` or `uint16_t` or `size_t` or…

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:33 +02:00
nmlgc d6f634631f [Maintenance] Declare distinct types for pixel and VRAM sizes
Oh wait, we also need one of those for an upcoming structure!

Part of P0111, funded by [Anonymous] and Blue Bolt.
2020-08-28 14:53:33 +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 bd1c2ee7de [Maintenance] #define the number of dots in a byte
One fewer magic number. And one more deliberate dependency on a
PC-98-specific hardware constant, to further drive home just how
unportable these games are, even once decompilation will be complete.

Part of P0105, funded by Yanga.
2020-08-12 16:16:58 +02:00
nmlgc 57a8487084 [Decompilation] [th01] FUUIN.EXE resident structure data retrieval
Completes P0094, funded by Yanga.
2020-05-25 15:22:53 +02:00
nmlgc 026fff63a5 [Decompilation] [th01] Ending picture loading and display
Aww, how far we've come with inlining and helpful macros.

Part of P0094, funded by Yanga.
2020-05-25 15:18:44 +02:00
nmlgc 00050d0e5e [Decompilation] [th01] VRAM text typing
Yeah, that 8×16 text RAM grid is so restricting.

Part of P0082, funded by Ember2528.
2020-03-13 19:09:12 +01:00