benilla-re systems structs docs

s_lightState

global · lighting

Address
0xce9b60 · 424 bytes, up to 0xce9d07
Type
uint8_t[424]
Meaning
Holds the light state: clock, camera, weather, light table, outputs and skybox slots
Confidence
verified, proof one
Finding
lighting/daynight#light-state

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.