coastline 0.0.4
Loading...
Searching...
No Matches
frameclock.h File Reference

The ticks of the frames of a race of the Boss Rally release, at 30 frames a second. More...

#include "common/types.h"
Include dependency graph for frameclock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TICK_PERIOD_MS   100
 The milliseconds of a period of ticks.
#define TICKS_PER_PERIOD   3
 The ticks of a period.
#define TICK_INTERVAL_MS   33
 The milliseconds of a tick, rounded down.

Functions

u32 GetHighResolutionTime (void)
 The time since the first call, from the performance counter in milliseconds rounded to the nearest, or the time of the system when there is no counter.
void AdvanceFrameTickCounter (void)
 Advance the ticks by one, the time of the current tick by the milliseconds of its phase.
void ResetFrameTimer (void)
 Start the ticks of the frames from the current time, at three for each tenth of a second.
void ResetFrameTimerState (void)
 Start the timing of the frames of a race again.
u32 GetFrameTickCounter (void)
 Get the time of the current frame tick.
void SnapshotPlatformFrameTimerState (void)
 Read the Windows frame clock before resetting the shared frame counters.

Variables

int g_dwGameFpsSampleFrames
 The number of game-loop durations averaged for the game frame rate.
int g_dwGameFpsFrameCountdown
 The game-loop sample written last, negative before the first loop.

Detailed Description

The ticks of the frames of a race of the Boss Rally release, at 30 frames a second.

Macro Definition Documentation

◆ TICK_PERIOD_MS

#define TICK_PERIOD_MS   100

The milliseconds of a period of ticks.

◆ TICKS_PER_PERIOD

#define TICKS_PER_PERIOD   3

The ticks of a period.

◆ TICK_INTERVAL_MS

#define TICK_INTERVAL_MS   33

The milliseconds of a tick, rounded down.

Function Documentation

◆ GetHighResolutionTime()

u32 GetHighResolutionTime ( void )

The time since the first call, from the performance counter in milliseconds rounded to the nearest, or the time of the system when there is no counter.

The first call divides by the frequency of the counter without checking it, as the original does.

Returns
The time in milliseconds.
Ghidra address:
BRD3D: 0x10075020
Ghidra address:
BRGlide: 0x1006e280

◆ AdvanceFrameTickCounter()

void AdvanceFrameTickCounter ( void )

Advance the ticks by one, the time of the current tick by the milliseconds of its phase.

Ghidra address:
BRD3D: 0x10075150
Ghidra address:
BRGlide: 0x1006e3b0

◆ ResetFrameTimer()

void ResetFrameTimer ( void )

Start the ticks of the frames from the current time, at three for each tenth of a second.

Ghidra address:
BRD3D: 0x10075100
Ghidra address:
BRGlide: 0x1006e360

◆ ResetFrameTimerState()

void ResetFrameTimerState ( void )

Start the timing of the frames of a race again.

Ghidra address:
BRD3D: 0x1002c4d0
Ghidra address:
BRGlide: 0x10019a40

◆ GetFrameTickCounter()

u32 GetFrameTickCounter ( void )

Get the time of the current frame tick.

Returns
The time in milliseconds.
Ghidra address:
BRD3D: 0x100750f0
Ghidra address:
BRGlide: 0x1006e350

◆ SnapshotPlatformFrameTimerState()

void SnapshotPlatformFrameTimerState ( void )

Read the Windows frame clock before resetting the shared frame counters.

Variable Documentation

◆ g_dwGameFpsSampleFrames

int g_dwGameFpsSampleFrames
extern

The number of game-loop durations averaged for the game frame rate.

Ghidra address:
BRD3D: 0x100aa008
Ghidra address:
BRGlide: 0x100a9358

◆ g_dwGameFpsFrameCountdown

int g_dwGameFpsFrameCountdown
extern

The game-loop sample written last, negative before the first loop.

Ghidra address:
BRD3D: 0x100aa00c
Ghidra address:
BRGlide: 0x100a935c