benilla-re systems structs docs

GatherMapObjectFacets

function · terrain · primitive

Address
0x6aaab0 · 781 bytes, up to 0x6aadbc
Signature
uint8_t __fastcall (const float *box, void *list, uint32_t mask, uint32_t *flags)
Meaning
Gathers the facets of the map objects and their groups in a box, failing when one there is not loaded
Confidence
verified, proof one
Finding
terrain/collide#map-object-gather
Test
terrain::collectinbox_negate_difftest

Finding: Map object gather in terrain: collide

0x6aaab0(box, list, mask, flags) gathers the facets of the map objects and their groups in a box, 1, or 0 when one there is not ready. Each instance of the map object list whose box +0x44 overlaps the box, but one with bit 0 of byte +0xd or no map object +0x118, needs its map object loaded (+0x1d4) and a def group, or the gather fails. The box, moved about its centre into the instance's space, is tested against the map object (0x6a4670): a pass gathers its group facets under 0xf0, ORing s_batchOverflow into *flags, its liquid under 0xf0000. Each overlapping def group must be loaded and its doodads (0xf0000f) ready (Doodad gather leg), then its game objects under 0xf00000.

The derivation is in the doc.

Callers 1

Callees 18

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