Commit Graph

6 Commits

Author SHA1 Message Date
nmlgc fb67d4d054 [Maintenance] Rename all old *_X and *_Y constants to *_LEFT and *_TOP
Part of P0112, funded by [Anonymous] and Blue Bolt.
2020-08-28 15:14:22 +02:00
nmlgc 70b4134af4 [Maintenance] [th04/th05] Assemble 16-bit .ASM files case-sensitively
Otherwise, TASM would simply convert all EXTRN declarations in those
files to uppercase. Then, the linker would expect them in uppercase,
forcing both the case-sensitive big 32-bit .ASM files *and* the entire
C land to declare them as uppercase as well.

For functions with __pascal convention which are always uppercased
anyway, this makes no difference. It does matter for regular __cdecl
variables, though, and the C declaration of [score_delta] in e6294c2
already showed that we'd then be forced to use macros if we wanted to
pretend that these names still had lowercase characters.

Doing this for every variable referenced in both C land and 16-bit ASM
land gets annoying quickly. So, no need to force this inconsistency if
we can get rid of it by slightly uglifying ASM land.

Part of P0089, funded by [Anonymous] and Blue Bolt.
2020-05-03 23:56:08 +02:00
nmlgc 7db8821c41 [Maintenance] [th04/th05] Declare public text popup symbols in C land
Part of P0089, funded by [Anonymous] and Blue Bolt.
2020-05-03 23:32:12 +02:00
nmlgc 624b66f3ca [Maintenance] [th04/th05] Add a segment split before the title popup functions
A bit tricky with those ASM translation units near-calling functions in
the very first segment, and #pragma codeseg requiring an additional
group parameter to correctly calculate array offsets (including those
used for `switch` statements). But doable.

Part of P0089, funded by [Anonymous] and Blue Bolt.
2020-05-03 23:28:25 +02:00
nmlgc d1f3dcd620 [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory
Adding op/, main/, and end/ directories does nicely cover a great
majority of the "not really further classifiable slices" implied in
d56bd45.

Part of P0086, funded by [Anonymous] and Blue Bolt.
2020-04-15 20:58:01 +02:00
nmlgc e6294c2c1a [Reverse-engineering] [th02/th04/th05] Score update and display
The TH02 version is a piece of cake…

… but TH04 starts turning it into this un-decompilable piece of
unnecessarily micro-optimized ZUN code. Couldn't have chosen anything
better for the first separate ASM translation unit.

Aside from now having to convert names of exported *variables* to
uppercase for visibility in ASM translation units, the most notable
lesson in this was the one about avoiding fixup overflows. From the
Borland C++ Version 4.0 User's Guide:

	"In an assembly language program, a fixup overflow frequently
	 occurs if you have declared an external variable within a
	 segment definition, but this variable actually exists in a
	 different segment."

Can't be restated often enough.

Completes P0032, funded by zorg.
2019-09-21 14:01:47 +02:00