mirror of
https://github.com/nmlgc/ReC98.git
synced 2025-02-26 20:55:09 +00:00

"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.
15 lines
228 B
NASM
15 lines
228 B
NASM
OVX_0 = 0
|
|
OVX_4_LEFT = 1
|
|
OVX_4_RIGHT = 2
|
|
OVX_8_LEFT = 3
|
|
OVX_8_RIGHT = 4
|
|
|
|
OF_BOUNCE_FROM_GROUND = 0
|
|
OF_BOUNCE_FROM_TOP = 1
|
|
OF_SHOT = 2
|
|
OF_IMMEDIATE = 3
|
|
|
|
public _orb_velocity_y, _orb_force
|
|
_orb_velocity_y dq 0.0
|
|
_orb_force dq 0.0
|