benilla-re systems structs docs

AddGroupToFrame

function · terrain · orchestration

Address
0x685d70 · 617 bytes, up to 0x685fd8
Signature
void __fastcall (uint32_t group_key, void *instance, uint32_t unused)
Meaning
Submits a map object group of an instance for the frame, linking it once and recording each visit
Confidence
verified, proof one
Finding
terrain/portals#group-submit

Finding: Group submit in terrain: map object visibility

0x685d70(group) is the callback of the walk and of 0x6b4160: it finds the instance's group node whose index is the argument and appends one draw record per visit. The first visit of a frame also links the node into the frame's group list (0xc7caf0, at the head of 0xc7caf4) and stores the side parity (+0x94), the fog flag (0xca7f00, +0x98) and the walk's value (+0x78). Every visit takes a 0xfc-byte record from the pool, copies the frustum volume on top of the stack into it and links it into the node's list (+0x9c). Then it runs the doodad def drain (0x6838f0) when any bit of 0x400081 is set in the world flags (0x685faf) and the entity drain (0x6834e0).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 11

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