UpdateCelestialBodies
function · lighting · primitive
- Address
0x6d3b80· 2289 bytes, up to0x6d4470- Meaning
- Places the sun disc, the moons and the stars from their tracks
- Confidence
- verified, proof one
- Finding
- lighting/celestial#celestial-bodies
- Test
lighting::dn_celestial_positions_difftest
Finding: Celestial bodies in lighting: sun, moons and stars
Each body sits 12 units from the camera eye along (cos a·sin p, sin a·sin p, cos p), normalized after the x product is rounded to a float, with its own azimuth and polar tracks. The sun disc and white moon use the time of day; moon02 uses the phase ((day + time) mod 1.7)/1.7, computed in 1/65536 steps. A body's size is its size track times its base scale: 1.0 for the sun disc, 1.75 for the white moon, 1.0 for moon02. The sun glare takes the sun disc's position, the moon glare the white moon's position, and the moon glare's two scale ends the white moon's size.
The derivation is in the doc.
Callers 2
- RecomputeLighting lighting
- UpdateCameraHeading lighting
Callees 3
- _atexit crt
- EvalSkyTrack lighting
- floor crt
Calls and jumps by a bare address, from tables/calls.tsv.