s_lightState
global · lighting
- Address
0xce9b60· 424 bytes, up to0xce9d07- 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.
| offset | holds | written by |
|---|---|---|
+0x00, +0x04, +0x08 | game clock word, time of day in [0, 1), day count as a float | the world frame |
+0x0c | active player's position | the world frame |
+0x18, +0x24 | camera eye, unit camera forward | the world frame |
+0x30 | camera heading, radians in [0, 2π) | 0x6d4530 |
+0x34, +0x38, +0x3c | far clip, clock in seconds, frame time | the world frame |
+0x40 | weather density | the world frame, the weather |
+0x44, +0x45 | screen tint level byte, tint colour | 0x6d45c0 |
+0x4c, +0x50 | override LightParams record, override light reference | 0x6d4620, 0x6d4630 |
+0x6c | storm weight | 0x6d4500 |
+0xac | the light table, 0x90 bytes | 0x6d2260 |
The derivation is in the doc.