Commit Graph

1234 Commits

Author SHA1 Message Date
Jonathan Campbell cc466c4654 [Pipeline] bmp2arr: more 2020-06-26 17:46:51 -07:00
Jonathan Campbell f90fe92f6c [Pipeline] bmp2arr: more 2020-06-26 17:36:39 -07:00
Jonathan Campbell d55ebe0358 [Pipeline] bmp2arr: row marker 2020-06-26 17:35:48 -07:00
Jonathan Campbell c45c6f860e [Pipeline] bmp2arr: asm more 2020-06-26 17:34:19 -07:00
Jonathan Campbell 776629ac0c [Pipeline] bmp2arr: ASM out 2020-06-26 17:32:32 -07:00
Jonathan Campbell 129b98cf4d [Pipeline] bmp2arr: Bitmap output, stride correct 2020-06-26 17:27:27 -07:00
Jonathan Campbell c36719f5fc [Pipeline] bmp2arr: more 2020-06-26 17:04:15 -07:00
Jonathan Campbell 1cc15151e8 [Pipeline] bmp2arr: scan, emit 2020-06-26 17:01:21 -07:00
Jonathan Campbell 9c62e00991 [Pipeline] bmp2arr: more 2020-06-26 16:26:20 -07:00
Jonathan Campbell e583a1c8ee [Pipeline] bmp2arr: Break out 2020-06-26 16:25:16 -07:00
Jonathan Campbell 1c673900f8 [Pipeline] bmp2arr: Make functions 2020-06-26 16:20:25 -07:00
Jonathan Campbell 06700a75b1 [Pipeline] bmp2arr: Begin save output 2020-06-26 16:16:56 -07:00
Jonathan Campbell 74c0ab7d42 [Pipeline] bmp2arr: Binary output 2020-06-26 15:44:57 -07:00
Jonathan Campbell deffa4d87c [Pipeline] bmp2arr: output symname 2020-06-26 15:41:45 -07:00
Jonathan Campbell 847205b79c [Pipeline] bmp2arr: Sprite width/height validation 2020-06-26 00:09:59 -07:00
Jonathan Campbell 51e335935a [Pipeline] bmp2arr: No output needed 2020-06-26 00:08:22 -07:00
Jonathan Campbell 0bff07eace [Pipeline] bmp2arr: Argh, fine, GIMP likes BI_RGB for 32bpp 2020-06-26 00:04:58 -07:00
Jonathan Campbell 58f0e08f3c [Pipeline] bmp2arr: Oh great, the GIMP emits the larger V5 BITMAPINFOHEADER 2020-06-25 23:54:45 -07:00
Jonathan Campbell a8946c9813 [Pipeline] bmp2arr: more 2020-06-25 23:43:01 -07:00
Jonathan Campbell a286e1634e [Pipeline] bmp2arr: more 2020-06-25 23:36:26 -07:00
Jonathan Campbell 667feb32c4 [Pipeline] bmp2arr: more 2020-06-25 23:35:44 -07:00
Jonathan Campbell a925e50d23 [Pipeline] bmp2arr: needs palette, or ImageMagick is not happy 2020-06-25 23:35:21 -07:00
Jonathan Campbell 8ea8eba4cb [Pipeline] bmp2arr: more 2020-06-25 23:33:06 -07:00
Jonathan Campbell cd4832357a [Pipeline] bmp2arr: Revert "bmp"
This reverts commit 96eb9e22ea.
2020-06-25 23:23:36 -07:00
Jonathan Campbell 96eb9e22ea [Pipeline] bmp2arr: bmp 2020-06-25 23:22:24 -07:00
Jonathan Campbell 26495ecab3 [Pipeline] bmp2arr: more 2020-06-25 23:21:04 -07:00
Jonathan Campbell 2856989176 [Pipeline] bmp2arr: more 2020-06-25 23:15:39 -07:00
Jonathan Campbell b5f31c8aaf [Pipeline] bmp2arr: initial code 2020-06-25 20:31:51 -07:00
nmlgc f03f43db3a [Regression] Fix conditional branches in CShots::hittest_pellet()
1 wrong byte of ASM that slipped through due to a off-by-one error in
an experimental mzdiff branch. Having MOV rather than LES here was
ultimately a harmless mistake though. In context, it's even covered by
the "identical instruction encoding" exception 🙂
2020-06-25 17:37:39 +02:00
nmlgc ed4d7282a0 [Pipeline] Add .BMP versions of all hardcoded 1bpp sprites found so far
A future sprite converter (documented in #8) could then convert these
to C or ASM arrays.

(Except for the piano sprites for TH05's Music Room, which are stored
and used in such a compressed way that it defeats the purpose of
storing them as bitmaps.
2020-06-21 23:03:45 +02:00
nmlgc 43c97ccaa1 [Maintenance] Decide on __asm as the keyword for inline assembly
Which works in both Borland C++, Open Watcom, and Visual C++.

Not that we're about to port any of the games to these compilers, just
something I noticed while evaluating 32-bit compilers for ReC98's own
32-bit pipeline tools. Modders might want to look into that though,
since 100% position independence also makes it easier to change
compilers.
2020-06-21 22:18:00 +02:00
nmlgc 97dce75446 [Maintenance] Proofread all comments in C land 2020-06-21 22:14:08 +02:00
nmlgc f54e05492e [Maintenance] [th01] Rename z_col_at() to z_graph_readdot()
There actually is a master.lib function doing the same!
2020-06-21 22:13:47 +02:00
nmlgc ad067486ca [Decompilation] [th01] Player shots: Pellet and boss collision
*Still* sloppily unblitting. And that's why you end up shooting 1-frame
holes into bosses!

Completes P0098, funded by Yanga.
2020-06-13 21:15:32 +02:00
nmlgc 60805cea7c [Decompilation] [th01] Player shots: Unblit/update/render function
And that's exactly where TH01's sprite flickering comes from. You
aren't supposed to unblit all entities of one type immediately before
rendering them, since sprites of different entity types are free to
overlap each other. And you might have already blitted one of those
before!

Not to mention that ZUN *still* uses the sloppy unblitting method here.
🙄

Part of P0098, funded by Yanga.
2020-06-13 21:15:31 +02:00
nmlgc d158d186e2 [Decompilation] [th01] Player shots: Reset function
Why the sloppyness of unblitting a whole 16×16 rectangle *if you have
a dedicated function to precisely unblit a .PTN sprite using its alpha
mask*???
Oh well, it's not the regular function called in the main loop, so who
cares…?

Part of P0098, funded by Yanga.
2020-06-13 21:15:31 +02:00
nmlgc f453625e30 [Maintenance] Move the declarations for planar graphics to their own file
Increasing build times by unnecessarily #including <master.h> has
finally become too annoying.

Part of P0098, funded by Yanga.
2020-06-13 21:15:31 +02:00
nmlgc 442a92d32b [Decompilation] [th01] Player shots: Spawn function
Continuing to learn new things about Turbo C++'s code generation!

Part of P0098, funded by Yanga.
2020-06-13 21:15:31 +02:00
nmlgc 40b8325cc3 [Maintenance] [th01] Move MDRV2 files to a separate `snd/` directory
Consistency… even though we won't have more of those in this game.

Part of P0098, funded by Yanga.
2020-06-13 21:15:30 +02:00
nmlgc 9ef56ad5ca [Reverse-engineering] [th01] Player shot class
Part of P0098, funded by Yanga.
2020-06-13 21:15:29 +02:00
nmlgc 600f036c04 [Reverse-engineering] [th01] Portal-related orb flags and variables
Completes P0097, funded by Ember2528.
2020-06-13 21:15:29 +02:00
nmlgc 51de73bcc9 [Decompilation] [th01] Orb physics
"Physics". Not only did ZUN restrict the X velocity to the 5 discrete
states of -8, -4, 0, 4, and 8 (because hey, unaligned blitting is slow
anyway?), but gravity is also only applied every 5 frames.

We're still missing quite a bit of usage code, but these are the core
functions. One of which turned out to be undecompilable, due to… a
rigorously defined instruction order when performing arithmetic between
`double`s and `float`s?! Still, spelling out all this stuff in ASM
seems much better than somehow splitting the data segment, just so that
we can immediately use literals there.

Part of P0097, funded by Ember2528.
2020-06-13 21:15:27 +02:00
nmlgc f364dc0182 [Reverse-engineering] [th01] Orb position
… Wow, the orb is *actually* only ever displayed at byte-aligned X
coordinates, divisible by 8. It's only thanks to the constant spinning
that its movement appears at least *somewhat* smooth.

(And yeah, this is purely a rendering issue; internally, its position
*is* tracked at pixel precision.)

Part of P0097, funded by Ember2528.
2020-06-13 21:13:51 +02:00
nmlgc 8283c5eec8 [Decompilation] [th01] .PTN: Unaligned 16×16 blitting
But no corresponding unblitting function…?

Completes P0096, funded by Ember2528.
2020-06-13 21:13:50 +02:00
nmlgc 979f401515 [Maintenance] [th01] .PTN: Define the transparent color in a single place
Inlined template functions! \o/

Part of P0096, funded by Ember2528.
2020-06-13 21:13:50 +02:00
nmlgc 9cd54f1b13 [Decompilation] [th01] .PTN: Byte-aligned 16×16 blitting
Part of P0096, funded by Ember2528.
2020-06-13 21:13:49 +02:00
nmlgc f6c668dafc [Decompilation] [th01] .PTN: Byte-aligned 16×16 unblitting
Part of P0096, funded by Ember2528.
2020-06-13 21:13:49 +02:00
nmlgc 71970f57c6 [Decompilation] [th01] .PTN: Byte-aligned 32×32 blitting
Part of P0096, funded by Ember2528.
2020-06-13 21:13:49 +02:00
nmlgc a55c5ced81 [Decompilation] [th01] .PTN: Byte-aligned 32×32 unblitting
Part of P0096, funded by Ember2528.
2020-06-13 21:13:48 +02:00
nmlgc 6a5fa3aee9 [Maintenance] [th01] Decide on `unput` for VRAM page 1 pixel restoration
"Unblitting" reads better in commit descriptions, though 🤔

Part of P0096, funded by Ember2528.
2020-06-13 21:13:48 +02:00