benilla-re systems structs docs

GetLightState

function · lighting · orchestration

Address
0x6d48b0 · 6 bytes, up to 0x6d48b5
Signature
void * __stdcall (void)
Meaning
Returns the light state
Confidence
verified, proof one
Finding
lighting/daynight#light-state
Test
terrain::mliq_depth_alpha_lut_difftest

Finding: Light state in lighting: day-night

The light state holds the clock, the camera, the weather and the outputs. These are the fields other systems write or the table build reads; offsets are from 0xce9b60.

offsetholdswritten by
+0x00, +0x04, +0x08game clock word, time of day in [0, 1), day count as a floatthe world frame
+0x0cactive player's positionthe world frame
+0x18, +0x24camera eye, unit camera forwardthe world frame
+0x30camera heading, radians in [0, 2π)0x6d4530
+0x34, +0x38, +0x3cfar clip, clock in seconds, frame timethe world frame
+0x40weather densitythe world frame, the weather
+0x44, +0x45screen tint level byte, tint colour0x6d45c0
+0x4c, +0x50override LightParams record, override light reference0x6d4620, 0x6d4630
+0x6cstorm weight0x6d4500
+0xacthe light table, 0x90 bytes0x6d2260

The derivation is in the doc.

Callers 40

Callees 0

None by a direct call or jump.

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