benilla-re systems structs docs

CMap::LoadWdl

function · terrain · primitive

Address
0x6944a0 · 692 bytes, up to 0x694753
Signature
void __cdecl (void)
Meaning
Reads the WDL's 545 heights per tile into low-detail tiles with their boxes and spheres
Confidence
verified, proof one
Finding
terrain/files#wdl
Test
terrain::wdl_tile_geometry_difftest

Finding: WDL in terrain: files

CMap::LoadWdl (0x6944a0) reads <dir>\<name>.wdl when it exists: a header, the version, a header and the 64×64 table of file offsets into 0xc9a350. For each nonzero offset it seeks there, skips a header, makes a CMapAreaLow kept in 0xc92078, and reads 545 signed 16-bit heights, stored as floats at +0x3c: 17×17 then 16×16, as the low-detail mesh reads them (lod). The tile's box runs from (X − 533.33331, Y − 533.33331, the lowest height) to (X, Y, the highest), with X = 17066.666 − 16·row·33.333332 and Y = 17066.666 − 16·column·33.333332, each one rounding; the centre is half the sum and the radius the distance to the box's top corner.

The derivation is in the doc.

Callers 1

Callees 8

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