benilla-re systems structs docs

GatherLiquidCellFacets

function · terrain · primitive

Address
0x68cec0 · 833 bytes, up to 0x68d200
Signature
void __thiscall (CChunkLiquid *this, void *list, uint32_t arg3, uint32_t arg4)
Meaning
Gathers a liquid slot's cell triangles inside a box into a triangle batch
Confidence
verified, proof one
Finding
terrain/collide#triangle-batches
Test
terrain::mclq_collect_difftest

Finding: Triangle batches in terrain: collide

The liquid and map object queries record the triangles they hit as batches in one shared table, and 0x671cc0 turns them into facets. A batch header is 0x20 bytes at 0xc62550 (at most 31 per query, the count at 0xc5a474): +0x0 the matrix, +0x4 the vertex array (12-byte vertices), +0xc the index triples (16 bits), +0x14 the index count, +0x16 the triangle count, +0x18 and +0x1a the lowest and highest index. The map object trace keeps the face words of its hit at the first header's +0x10. Matrices are 0x40 bytes at 0xc62980 (31), indices come from a pool of 0xc000 at 0xc63298; a full table sets bit 0 of 0xc63258 and the batch is dropped.

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

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