benilla-re systems structs docs

CopyLocalTime

function · unassigned · orchestration

Address
0x642490 · 33 bytes, up to 0x6424b0
Signature
void __fastcall (const int32_t *seconds, void *out)
Meaning
Copies the 36-byte localtime of a time into a buffer, or zeroes the buffer when localtime fails
Confidence
verified, proof one
Finding
gametime/overview#time-record-helpers

Finding: Time record helpers in gametime: overview

A time record is seven dwords: minute, hour, weekday, day and month from 0, year from 2000, and a two-bit field. 0x642300 sets the first six to −1 and the seventh to 0. 0x6424c0 returns hour·60 + minute, 0 when either is negative. 0x6424e0(n) sets the hour to n / 60 and the minute to the signed remainder. 0x6423c0(days, keepTime) leaves a record with a negative year, month or day unchanged. Otherwise it gives mktime the date at 0:00, or at its hour and minute with keepTime, adds days · 86400 seconds, and 3600 more without keepTime, and writes back localtime's year, month, day and weekday, and its hour and minute with keepTime. 0x642c10 packs a record through WowTime::WowEncodeTime.

The derivation is in the doc.

Callers 1

Callees 1

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