benilla-re systems structs docs

GetWeatherTileHeight

function · lighting · primitive

Address
0x67c820 · 218 bytes, up to 0x67c8f9
Meaning
Returns a tile cell's height, filling it on first use, or FLT_MAX outside the tile
Confidence
verified, proof one
Finding
lighting/weather#ground-grid
Test
lighting::tile_cell_fill_difftest, lighting::wl_height_cache_lookup_xy

Finding: Ground grid in lighting: weather

Particles land on a cached height grid: 5 × 5 tiles around the camera's chunk, each tile one chunk of 32 × 32 cells, 1/0.96 yards a cell. A cell starts empty (FLT_MAX) and is filled on first use with the surface height within 200 below the point, or the point's height less 200 when nothing is hit. A point outside the grid has no height. A segment test walks the cells from its first point to its second and stops at the first cell whose height is above the segment there, returning that point with the cell's height. When the camera changes chunk the grid recentres, keeping the tiles it still covers.

The derivation is in the doc.

Callers 1

Callees 1

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