benilla-re systems structs docs

CullGroupEntityList

function · terrain · primitive

Address
0x6834e0 · 539 bytes, up to 0x6836fa
Signature
void __fastcall (void *group, void *record)
Meaning
Culls a map object group's entities and queues the visible ones, the rest on the second list
Confidence
verified, proof one
Finding
terrain/scene#entity-cull
Test
terrain::scenewalk_camplane_sort_key_difftest, terrain::scenewalk_near_audibility_diffs_difftest

Finding: Entity cull in terrain: scene

0x683340 culls a band's entities and 0x6834e0 those in a map object group (ecx the group, edx its record). Both skip an entity whose +0x94 is 0 and store the view depth of its sphere, camera plane · centre + d − radius, at +0x78. An entity inside the frustum (0x682ef0 is 0) and not hidden by the horizon (0x686000 below 2) clears bit 0 of +0x94 and moves to the entity draw list. Otherwise, with a model, it is set animated when its centre is within squared distance 10.0 of the camera and not animated beyond; the group variant also moves the entity to the second list.

The derivation is in the doc.

Callers 1

Callees 8

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