1#ifndef COASTLINE_PLATFORM_WIN_RACE_PACING_H
2#define COASTLINE_PLATFORM_WIN_RACE_PACING_H
72 for (i = 0; i < sampleFrames; i++) {
75 index = sampleFrames > 0 ? sampleFrames : 0;
83 index = (int)((
unsigned)index + 1u);
84 if (index >= sampleFrames) {
The ticks of the frames of a race of the Boss Rally release, at 30 frames a second.
int g_dwGameFpsFrameCountdown
The game-loop sample written last, negative before the first loop.
int g_dwGameFpsSampleFrames
The number of game-loop durations averaged for the game frame rate.
u32 GetHighResolutionTime(void)
The time since the first call, from the performance counter in milliseconds rounded to the nearest,...
unsigned g_adwGameFpsFrameTimeSamples[GAME_FPS_FRAME_TIME_SAMPLE_COUNT]
Recent game-loop durations in milliseconds.
static void UpdateRaceFrameStatistics(void)
Record the duration of the preceding game loop.
Definition racepacing.h:63
unsigned g_dwLastRaceRenderTime
The time a snapshot was last drawn, in milliseconds.
unsigned g_dwLastFrameTimestamp
The time of the preceding game loop, in milliseconds.
volatile unsigned g_dwRaceAccumulatedTime
The milliseconds the race has run since its first frame.
unsigned g_dwNextRaceFrameTime
The time the next game frame is due, in milliseconds.
static void PaceRaceFrames(void)
Render interpolated snapshots until the next game frame is due.
Definition racepacing.h:92
const unsigned g_adwRaceFrameIntervals[3]
The milliseconds of three game frames in turn, a tenth of a second together.
int g_nRaceFramesWithoutRender
The game frames run since a snapshot was last drawn.
int g_nRacePacingInterval
The entry of g_adwRaceFrameIntervals that paces the next frame.
int g_dwRaceFrameCounter
The frame of the race, -1 before the first.
int InterpolateFrameSnapshotsAndRender(int forceRender)
Blend captured race frames and render the result, marking the referenced pool slots in use.
int g_bFrameTimerReset
Whether race timing must restart when simulation resumes after a pause or initialisation.