benilla-re systems structs docs

TraceTerrainSegment

function · terrain · orchestration

Address
0x69c320 · 438 bytes, up to 0x69c4d5
Signature
uint8_t __fastcall (const float *start, const float *end, float *t, uint32_t mask, uint32_t flag)
Meaning
Lists the cells a segment crosses and tests their triangles, lowering the fraction on a hit
Confidence
verified, proof one
Finding
terrain/trace#terrain-walk
Test
terrain::ray_dda_map_driver, terrain::raycast_e2e_map_driver

Finding: Terrain walk in terrain: trace

0x69c320(start, end, t, mask) turns both ends into cells, row from x and column from y as round(0.24·(17066.666 − c) − 0.5), and fills the cell list by one of four walks: a run along one column when the y extent is below 2.3841858e-7 or both ends share a column, a run along one row likewise for x, and otherwise a line walk along the larger extent. It then tests the listed cells with 0x69c920.

The derivation is in the doc.

Callers 4

Callees 5

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