benilla-re systems structs docs

CWorld::SetFarClip

function · terrain · primitive

Address
0x6725d0 · 84 bytes, up to 0x672623
Signature
void __stdcall (float farClip)
Meaning
Stores the far clip when it changes, sets both half-extents to 1 − ftol(−0.03·far) and raises three dirty flags
Confidence
verified, proof one
Finding
terrain/world#area-of-interest
Test
terrain::param_setter_difftest

Finding: Area of interest in terrain: world

0x672730 centres two windows on a position in chunk indices, index = round((17066.666 − p) × 0.03 − 0.5) per axis, the first from p.x. The inner window is the index ± r, r = 1 + trunc(far clip × 0.03) (0x6725d0); the outer is the index ± max(r + 2, 8). Both clamp to 0 to 1023. It also rebuilds the position boxes: ± the far clip, those ± 33.333332, ± 150 and ± the far clip in three axes.

The derivation is in the doc.

Callers 1

Callees 1

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