benilla-re systems structs docs

CMapChunk::CreateDetailDoodads

function · terrain · primitive

Address
0x6bfc10 · 1684 bytes, up to 0x6c02a3
Signature
void __thiscall (CMapChunk *this)
Meaning
Scatters a chunk's detail doodads from its layers' ground effects with one seeded random stream
Confidence
verified, proof one
Finding
terrain/detail#detail-doodad-scatter

Finding: Detail doodad scatter in terrain: detail doodads

0x6bfc10 scatters the detail doodads of a chunk. It needs the chunk to have layers and every model they name to be loaded (0x6bfb70); it makes the chunk's batch and seeds one random stream with (chunk +0x90 << 16) | chunk +0x8c. Pass 1 draws the frillDensity cells, each two draws (column, then row, each the stream's value & 7), repeats allowed, and builds the cell's four ground planes once. Pass 2 takes the picks in order, skipping a pick whose cell has its no-effect bit set, lies in a hole quad, or whose layer has no effect row, and places the row's Density tufts (8 when it is 0).

The derivation is in the doc.

Callers 1

Callees 8

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