WeatherTicksToSeconds
function · lighting · primitive
- Address
0x674600· 29 bytes, up to0x67461c- Meaning
- Converts a tick count in ecx to seconds as ticks/1024
- Confidence
- verified, proof one
- Finding
- lighting/precipitation#particle-clock
- Test
lighting::weather_tick_scale_difftest
Finding: Particle clock in lighting: precipitation
The particles run on a clock of 1024 ticks a second. Each world update adds the frame time to it as round(t·1024 − 0.5) ticks, ties to even, so an exact odd t·1024 comes out one tick low; particle times convert the same way, and back as ticks/1024. The frame's tick count is kept beside the clock.
The derivation is in the doc.
Callers 13
- Rain::Update lighting
- Rain::DrawPatterFixed lighting
- Rain::DrawDropsFixed lighting
- Rain::DrawPatterShader lighting
- Rain::DrawDropsShader lighting
- Snow::Update lighting
- Snow::DrawShader lighting
- Snow::DrawFixed lighting
- Sand::Update lighting
- Sand::DrawFixed lighting
- Sand::DrawShader lighting
- Mists::SpawnPuff lighting
- Mists::Render lighting
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.