benilla-re systems structs docs

TraceListedCells

function · terrain · primitive

Address
0x69c920 · 1154 bytes, up to 0x69cda1
Signature
uint8_t __fastcall (const float *start, const float *end, float *t, uint32_t mask, uint32_t flag)
Meaning
Intersects the listed cells' triangles with a segment, keeping the nearest fraction
Confidence
inferred
Finding
terrain/trace#cell-walks
Test
terrain::dda_cell_intersect_difftest, terrain::raycast_e2e_map_driver

Finding: Cell walks in terrain: trace

The four walks list the cells a segment's projection crosses: a straight run of cells from start to end along one axis, or a line walk that steps the major axis one cell at a time, computes the minor cell from the line, lists an extra cell at each change of the minor cell, and ends with the end cell. The per-cell test resolves each cell's area and chunk, skips holes, and intersects the cell's four triangles, keeping the nearest fraction.

The derivation is in the doc.

Callers 1

Callees 6

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