benilla-re systems structs docs

DrawDetailDoodadBatch

function · terrain · host

Address
0x6b2b80 · 480 bytes, up to 0x6b2d5f
Signature
void __thiscall (void *this)
Meaning
Draws a chunk's batch under the fade ramp, blend 2 and the alpha reference
Confidence
verified, proof one
Finding
terrain/detail#detail-doodad-draw
Test
terrain::detail_doodad_texgen_difftest

Finding: Detail doodad draw in terrain: detail doodads

0x6b2b80 draws a chunk's batch. It sets stage 0 combine 1 (modulate), culling off, device colour white, blend 2, the alpha reference to the byte 0xc7b2fc (128 at start-up), depth write on and the ramp on stage 1 with combine 1, camera-space texture coordinates (state 0x30 = 3) and its texture matrix on (state 0x38 = 1). The stage 1 matrix makes u = (z − 52.5)/17.5 and v = y/17.5 of the eye-space position: scale 1/(70 × 0.25), rotate π/2 about y, translate (0, 0, 70 × −0.75). Each slot with data is uploaded and drawn with its model's texture on stage 0. Culling and depth write are set to 1 at the end.

The derivation is in the doc.

Callers 1

Callees 9

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