benilla-re systems structs docs

UpdateSunDirection

function · lighting · primitive

Address
0x6d3a10 · 329 bytes, up to 0x6d3b58
Meaning
Sets the sun direction from the sun tracks at the time of day
Confidence
verified, proof one
Finding
lighting/celestial#sun-direction
Test
lighting::dn_sun_dir_difftest

Finding: Sun direction in lighting: sun, moons and stars

The lighting sun is (cos a·sin p, sin a·sin p, cos p) at state +0x168, with a the sun azimuth track and p the polar track at the time of day. Its bearing never changes and p stays between 110° and 127°, so the direction always points down; it is the direction light travels.

The derivation is in the doc.

Callers 2

Callees 2

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