CMap::LoadWdl
function · terrain · primitive
- Address
0x6944a0· 692 bytes, up to0x694753- 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
- CMap::Load terrain
Callees 8
- SplatVector3 loadingscreen
- 0x4b1df0 ui
- SFile::Open storm
- SFile::Read storm
- SFile::Close storm
- SFile::SetFilePointer storm
- SStrPrintf storm
- GetBlockPoolData base
Calls and jumps by a bare address, from tables/calls.tsv.