benilla-re systems structs docs

CMovement::GetFlagChangeOpcode

function · collision · primitive

Address
0x619f00 · 175 bytes, up to 0x619fae
Signature
uint32_t __thiscall (const CMovement *this, uint32_t oldFlags, uint32_t noJump)
Meaning
Returns the movement opcode for the flags against old flags: 0xb5 to 0xbb, 0xca or 0xcb
Confidence
verified, proof one
Finding
collision/handlers#opcode-from-a-flag-change

Finding: Opcode from a flag change in collision: handlers

0x619f00(old, noJump) picks a movement opcode from the mover's flags against old; the first row that holds decides.

conditionopcode
(flags ^ old) & 3; flags & 1, else & 2, else neither0xb5, 0xb6, 0xb7
(flags ^ old) & 0xc; flags & 4, else & 8, else neither0xb8, 0xb9, 0xba
flags & 0x2000, +0xa0 ≠ 0.0 or NaN, noJump 00xbb
(flags ^ old) & 0x200000; flags swimming, else not0xca, 0xcb
otherwise0xb7

Its one caller, step 5 of the broadcaster, runs it only when the direction nibble changed, so it returns 0xb5 to 0xba there.

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.