UploadDetailDoodadSlot
function · terrain · host
- Address
0x6b2d60· 208 bytes, up to0x6b2e2f- Signature
uint8_t __thiscall (void *this)- Meaning
- Fills a slot's buffers when they hold none and draws it with its model's texture
- Confidence
- verified, proof one
- Finding
- terrain/detail#detail-doodad-draw
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 2
- BeginDetailDoodadPass terrain
- DrawDetailDoodadBatch terrain
Callees 11
- GetTextureDeviceObject gx
- GxRsSetObject gx
- 0x58a010 gx
- 0x58a100 gx
- 0x58a110 gx
- GxVertexBufBind gx
- PassBufferToDevice gx
- GxPrimRenderOne gx
- LockDetailDoodadBuffers terrain
- FillDetailDoodadVertices terrain
- FillDetailDoodadIndices terrain
Calls and jumps by a bare address, from tables/calls.tsv.