benilla-re systems structs docs

UpdateCameraEnvironment

function · terrain · host

Address
0x6809c0 · 482 bytes, up to 0x680ba1
Signature
void __cdecl (void)
Meaning
Samples the liquid at the camera probe, sets the camera liquid state and depth and reconfigures the drift cloud
Confidence
verified, proof one
Finding
terrain/camstate#camera-environment
Test
terrain::camera_probe_z_delta_a_difftest, terrain::camera_probe_z_delta_b_difftest

Finding: Camera environment in terrain: camera state

0x6809c0 samples the liquid at the camera's probe point: the camera's x and y, and the lowest z of the camera and the four near corners of the frustum. Inside a map object group (0xc7b748) it asks the group's liquid, with the point moved into the group's space; outdoors it asks the terrain query 0x6723d0. The depth 0xc7bc60 is the liquid height less the probe z, 0 when dry. The state 0xc7f288 becomes the liquid type, 0xf when dry. A change to type 0 or 1 scatters the drift cloud and sets the size base 1/36, to type 2 scatters it and sets 1/9, to type 3 clears the cloud's enable byte; leaving liquid forces a lighting rebuild.

The derivation is in the doc.

Callers 1

Callees 7

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