GameTimeGetDayPhase
function · gametime · primitive
- Address
0x643a70· 85 bytes, up to0x643ac4- Signature
double __thiscall (void *this)- Meaning
- Returns the time of day as a fraction of a day from the tick, scale and minute offset
- Confidence
- verified, proof one
- Finding
- gametime/overview#day-phase
- Test
gametime::gametime_643a70_day_phase
Finding: Day phase in gametime: overview
0x643a70 returns the time of day as a fraction. x = (tick − [+0x38]) · 0.001f · [+0x2c] + [+0x3c],
with the tick difference an unsigned 32-bit value; x loses 1440.0 while it exceeds 1440.0; the result
is x · (1/1440) (0x3a360b61) left in st0, not rounded. At x = 1440 that is 1440 · f32(1/1440) = 1.0000000242, so the value is in [0, 1] only once stored: both callers store it with fstp DWORD (0x482be2, 0x6c5f77), which rounds it to 1.0f.
The derivation is in the doc.
Callers 2
- StampLightState ui
- OnGameTimeSet unassigned
Callees 1
- OsGetAsyncTimeMs core
Calls and jumps by a bare address, from tables/calls.tsv.