GetLightState
function · lighting · orchestration
- Address
0x6d48b0· 6 bytes, up to0x6d48b5- 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.
| 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.
Callers 40
- CSimpleModelFFX::OnFrameShow glue
- BuildCharSelectModel glue
- StampLightState ui
- MinimapFrameRender ui
- CGObject_C::SetLight objectlayer
- CWorld::BeginFrame terrain
- CWorld::SetFogState terrain
- CWorld::UpdateSkyAndFog terrain
- ApplyEntityLighting terrain
- Sand::DrawFixed lighting
- Sand::DrawShader lighting
- Mists::Render lighting
- RampWeather lighting
- DrawWorldScene terrain
- DrawMapObjectPass terrain
- DrawGroupLiquidPass terrain
- FillLiquidSwatch terrain
- FillSkyGradient terrain
- GatherSlotLights terrain
- BakeMapEntityGroupLight terrain
- AnimateMapEntityLight terrain
- UnloadAreaObjects terrain
- ApplyMapLighting terrain
- CMapDoodadDef::BakeGroupLight terrain
- ScaleSelfLitMaterials terrain
- WalkPortals terrain
- DrawInteriorGroupBatches terrain
- DrawGroupLiquid terrain
- DrawExteriorGroupLiquid terrain
- BuildGroupDepthRamp terrain
- CMapAreaLow::Draw terrain
- ApplyMapObjectFog terrain
- OnGameTimeSet unassigned
- RenderGlowPass ffxeffects
- RenderGlowWavePass ffxeffects
- RenderDeathPass ffxeffects
- TraceGlareOcclusion lighting
- QueryGlareOcclusion lighting
- DrawGlare lighting
- DrawDisc lighting
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.