benilla-re systems structs docs

GetSmoothedFrameRate

function · terrain · primitive

Address
0x6724c0 · 69 bytes, up to 0x672504
Signature
float __cdecl (void)
Meaning
Returns 1 over the mean of the 30 ring frame times, or 1000 when the mean is below 0.001
Confidence
verified, proof one
Finding
terrain/world#smoothed-frame-rate
Test
terrain::smoothed_frame_rate_difftest

Finding: Smoothed frame rate in terrain: world

GetSmoothedFrameRate() sums the 30 frame times of the ring 0xc631c8, starting at the write index 0xc7b488 and wrapping, from 0.0 at 53 bits, and multiplies by 1/30 (0x3d088889). A mean below 0.001 returns 1000.0; any other, a NaN included, returns 1 / mean unrounded on the stack. GetFramerate passes it to Lua as a double. The ring holds 0xc62510, the frame seconds, written by 0x672700 one slot a frame (World frame).

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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