benilla-re systems structs docs

s_worldFrameTimeIndex

global · terrain

Address
0xc7b488 · 4 bytes, up to 0xc7b48b
Type
uint32_t
Meaning
Holds the next slot of the frame time ring 0xc631c8, 0 to 29
Confidence
verified, proof one
Finding
terrain/world#smoothed-frame-rate

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.