benilla-re systems structs docs

CullDoodadDefList

function · terrain · primitive

Address
0x683700 · 494 bytes, up to 0x6838ed
Signature
void __thiscall (void *this)
Meaning
Culls a band's doodad defs by frustum and horizon and queues the visible ones
Confidence
verified, proof one
Finding
terrain/scene#doodad-def-cull
Test
terrain::scenewalk_camplane_sort_key_difftest, terrain::scenewalk_near_audibility_jnp_difftest

Finding: Doodad def cull in terrain: scene

0x683700 culls a band's doodad defs and 0x6838f0 those of a group. A def not seen this frame (its +0x164 differs from the frame counter) gets the stamp and +0x94 of 1. A def with neither a model nor a transform callback (+0x88, +0x174) is skipped. The others get the depth stored and the same two tests; a def that passes clears bit 0 of +0x94, moves to the doodad def draw list 0xc7cae8 and increments the visible counter 0xc7b600. A def that fails with a model is set animated when its +0x90 bit 9 is set or its centre is within squared distance 10.0 (0x81017c) of the camera.

The derivation is in the doc.

Callers 1

Callees 4

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