benilla-re systems structs docs

RollDriftGust

function · terrain · primitive

Address
0x68e1c0 · 807 bytes, up to 0x68e4e6
Signature
void __thiscall (void *this)
Meaning
Rolls a new gust direction, rate and amplitude from the client random stream and zeroes its time
Confidence
verified, proof one
Finding
terrain/waterfx#drift-gust
Test
terrain::weather_drift_reinit_difftest, terrain::weather_gust_velocity_difftest, terrain::weather_toroidal_advect_difftest

Finding: Drift gust in terrain: water effects

The cloud holds one gust: a unit direction, a time, a rate and an amplitude. 0x68e1c0 rolls a new one from the client random stream: two angles a and b, each ±(2 − f)·π with f in [1, 2) the mantissa-filled draw and the sign from the draw's top bit; the direction is (sin a·cos b, sin a·sin b, |cos a|·0.25) normalized; the time is 0; the rate is a fresh f × 0.0125 and the amplitude a fresh f × 0.005. 0x68e4f0 gives the frame's displacement from the gust.

The derivation is in the doc.

Callers 2

Callees 1

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