benilla-re systems structs docs

CMovement::ApplyLatchedDirections

function · collision · primitive

Address
0x61ab20 · 99 bytes, up to 0x61ab82
Signature
uint32_t __thiscall (CMovement *this)
Meaning
Applies the latched stop and start bits 15 to 20, clears them, and returns the direction bits changed
Confidence
verified, proof one
Finding
collision/handlers#deferred-direction-latches

Finding: Deferred direction latches in collision: handlers

While falling, the movement commands record a press in latch bits instead of the direction: 0x8000 stop, 0x10000 stop strafe, 0x20000 or 0x40000 start forward or back, 0x80000 or 0x100000 start strafe. 0x61ab20 applies them in that order through 0x7c6c00, 0x7c6ce0, 0x7c6ae0(flags & 0x20000) and 0x7c6c50(flags & 0x80000), clears bits 0x1f8000 and returns (flags ^ entry flags) & 0xf.

The derivation is in the doc.

Callers 4

Callees 4

Calls and jumps by a bare address, from tables/calls.tsv.