CullEntityList
function · terrain · primitive
- Address
0x683340· 413 bytes, up to0x6834dc- Signature
void __thiscall (void *this)- Meaning
- Culls a band's entities by frustum and horizon and queues the visible ones
- Confidence
- verified, proof one
- Finding
- terrain/scene#entity-cull
- Test
terrain::camplane_sort_key_difftest,terrain::near_audibility_jp_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
- WalkScene terrain
Callees 4
- IsSphereCulled terrain
- TestHorizonSphere terrain
- NextLinkB terrain
- CM2Model::SetAnimated models
Calls and jumps by a bare address, from tables/calls.tsv.