coastline 0.0.4
Loading...
Searching...
No Matches
coastline::EngineRuntime Class Reference

Front-end choices and race buffers for one active engine runtime. More...

#include <runtimebuffers.h>

Public Types

using SnapshotSlots = int[FRAME_SNAPSHOT_COUNT]
 Usage counters indexed by the race engine's frame-snapshot slot.

Public Member Functions

 EngineRuntime ()
 Register the sole active runtime and initialise its front-end defaults.
 ~EngineRuntime ()
 Unregister the active runtime before its race storage is destroyed.
 EngineRuntime (const EngineRuntime &)=delete
 Copying is disabled because only one runtime can be active.
EngineRuntime & operator= (const EngineRuntime &)=delete
 Assignment is disabled because active runtime storage has a stable address.
SdlFrontEndState & FrontEnd ()
SdlSkidMarkState & SkidMarks ()
SnapshotSlots & SnapshotUsage ()
int & RaceStarted ()
s16 & DentLimit ()

Static Public Member Functions

static EngineRuntime * Active ()

Detailed Description

Front-end choices and race buffers for one active engine runtime.

Member Typedef Documentation

◆ SnapshotSlots

Usage counters indexed by the race engine's frame-snapshot slot.

Constructor & Destructor Documentation

◆ EngineRuntime() [1/2]

coastline::EngineRuntime::EngineRuntime ( )

Register the sole active runtime and initialise its front-end defaults.

◆ ~EngineRuntime()

coastline::EngineRuntime::~EngineRuntime ( )

Unregister the active runtime before its race storage is destroyed.

◆ EngineRuntime() [2/2]

coastline::EngineRuntime::EngineRuntime ( const EngineRuntime & )
delete

Copying is disabled because only one runtime can be active.

Member Function Documentation

◆ operator=()

EngineRuntime & coastline::EngineRuntime::operator= ( const EngineRuntime & )
delete

Assignment is disabled because active runtime storage has a stable address.

◆ Active()

EngineRuntime * coastline::EngineRuntime::Active ( )
static
Returns
The active runtime, or null outside its lifetime.

◆ FrontEnd()

SdlFrontEndState & coastline::EngineRuntime::FrontEnd ( )
inline
Returns
Mutable front-end choices for this runtime.

◆ SkidMarks()

SdlSkidMarkState & coastline::EngineRuntime::SkidMarks ( )
inline
Returns
The skid-mark pool used by this runtime's race.

◆ SnapshotUsage()

SnapshotSlots & coastline::EngineRuntime::SnapshotUsage ( )
inline
Returns
Mutable usage counters for the frame-snapshot pool.

◆ RaceStarted()

int & coastline::EngineRuntime::RaceStarted ( )
inline
Returns
The race-start flag shared with the engine's C interface.

◆ DentLimit()

s16 & coastline::EngineRuntime::DentLimit ( )
inline
Returns
The engine's maximum dent displacement, initially 0x100.

The documentation for this class was generated from the following file: