benilla-re systems structs docs

CMovement::CalcBaseDirection

function · collision · primitive

Address
0x7c5880 · 197 bytes, up to 0x7c5944
Signature
void __thiscall (CMovement *this)
Meaning
Sets the heading and pitch bases and the forward direction from the anchor facing and swim pitch
Confidence
verified, proof one
Finding
collision/kinematics#direction-and-heading-basis
Test
collision::velocity_basis_difftest

Finding: Direction and heading basis in collision: kinematics

0x7c5880 sets the basis h = (+0x68, +0x6c) = (fl(cos F), fl(sin F)), F = +0x50. Swimming (0x00200000) with |P| ≥ 2⁻²⁰ or NaN, P = +0x54, it sets (+0x70, +0x74) = (fl(cos P), fl(sin P)) and d = +0x5c = (fl(h.x·+0x70), fl(h.y·+0x70), +0x74); else d = (h, 0) and (+0x70, +0x74) = (1, 0). 0x7c5a20(force) calls it and then turns d and h by the direction bits, first match (− applies for 0x2, √½ = 0.70710677, 0x3f3504f3):

bitsdh
0x2000 with force 0not writtennot written
0x3 and 0xc(±d + (s, 0))·√½(±h + s)·√½
0x3±d±h
0x4(s, 0), s = (−sin F, cos F)s
0x8(s, 0), s = (sin F, −cos F)s

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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