benilla-re systems structs docs

DrawDoodadModels

function · terrain · host

Address
0x683f80 · 533 bytes, up to 0x684194
Signature
void __cdecl (void)
Meaning
Draws the frame's doodad defs: transform callback, matrix, distance fade, light
Confidence
verified, proof one
Finding
terrain/scene#doodad-def-draw
Test
terrain::doodad_fade_difftest

Finding: Doodad def draw in terrain: scene

0x683f80 draws the doodad defs: each is unlinked, its transform callback +0x174 called and its model's matrix set. With world flag 1 set, d is the horizontal distance of the centre from the camera less the radius r, and r picks the alpha 1 − (d − s)/n, capped at 1.0: s = 40, n = 10 for r ≤ 0.5; s = 100, n = 25 for r ≤ 2.5; s = 150 (the far clip less 50 when that is under 200), n = 50 for r ≤ 7.0; a larger r never fades. Above 0 the model is set animated, visible and lit with the alpha; else it stays as it was.

The derivation is in the doc.

Callers 1

Callees 5

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