1#ifndef COASTLINE_PLATFORM_WIN_SNAPSHOT_H
2#define COASTLINE_PLATFORM_WIN_SNAPSHOT_H
22 [[maybe_unused]]
unsigned char unreconstructedA04[4];
25 unsigned unreconstructed2c0e0;
27 [[maybe_unused]]
unsigned char unreconstructed2e0ec[4];
44 return *vehicles[0].GetActiveCamera();
46#if TGR_PLATFORM == TGR_PLATFORM_SDL
52 return vehicles[index];
99#if TGR_PLATFORM == TGR_PLATFORM_SDL
105#define g_abFrameSnapshotInUse (*GetSdlSnapshotUsage())
156#if TGR_PLATFORM == TGR_PLATFORM_SDL
#define MAX_VEHICLES
The capacity of the race engine's vehicle array.
Definition bossrallyvehicle.h:23
Captured race geometry, cameras, and particles for interpolation between simulation steps.
Definition snapshot.h:18
const ParticleSnapshot & GetParticles() const
Definition snapshot.h:61
void Capture()
Capture active vehicles, racers, the primary viewport, and particles from the race.
unsigned GetSequence() const
Definition snapshot.h:31
void InterpolateFrom(const FrameSnapshot &from, const FrameSnapshot &to, long double share)
Interpolate vehicle poses and cameras while copying racers, viewport, and particles.
const Vehicle & GetVehicle(int index) const
Definition snapshot.h:51
void RenderRacingScreen()
Render the racing screen from this snapshot using the active renderer.
Vehicle * GetVehicles()
Definition snapshot.h:57
const CameraFrame & GetPrimaryCamera() const
Definition snapshot.h:43
void SetSequence(unsigned value)
Assign a capture sequence without modifying the stored race frame.
Definition snapshot.h:39
#define RACER_SLOTS
The racers of a race.
Definition racerslot.h:11
FrameSnapshot g_InterpolatedFrameSnapshot
Temporary output of interpolation between two captured race frames.
unsigned g_dwFrameSnapshotBlendStartTime
The millisecond timer value of the previous interpolation update, or zero before the first.
int g_dwFrameSnapshotCurrentSlot
The most recent completed snapshot slot, or -1 before the first capture.
int g_dwFrameSnapshotBlendFromSlot
The earlier snapshot selected for the current blend, or -1 before selection.
void InitFrameSnapshotSlots(void)
Initialise slot flags, sequence counters, and interpolation timers once per valid pool.
int g_dwInterpolatedFrameCount
The number of frames rendered from interpolated snapshots since the slots were set up.
int GetInterpolatedFrameCount(void)
Get the number of frames rendered from interpolated snapshots since the slots were set up.
@ FRAME_SNAPSHOT_COUNT
Definition snapshot.h:15
void InvalidateFrameSnapshotSlots(void)
Mark the snapshots of frames as not set up.
FrameSnapshot g_aFrameSnapshots[FRAME_SNAPSHOT_COUNT]
The rotating snapshot pool, indexed by the current, previous, and blend slot selectors.
int g_bFrameSnapshotsInitialized
Whether the snapshots of frames are set up.
float g_fFrameSnapshotBlendCarry
Fractional interpolation progress retained from the previous rendered frame.
int g_dwFrameSnapshotPreviousSlot
The completed snapshot slot preceding the current slot, or -1 before two captures.
int(* GetSdlSnapshotUsage(void))[FRAME_SNAPSHOT_COUNT]
int g_nLastInterpolatedSnapshot
The later snapshot slot selected for interpolation, or -1 before selection.
#define g_abFrameSnapshotInUse
Slot-use flags for the active SDL engine's snapshot pool.
Definition snapshot.h:105
FrameSnapshot * InterpolateFrameSnapshots(float share)
Blend the last two snapshots of the race into g_InterpolatedFrameSnapshot as InterpolateFrameSnapshot...
int AcquireNextFrameSnapshotSlot(void)
Select the oldest unused slot, advancing the current and previous completed slot selectors.
A frame of reference: three axes and a position, the rows of a 4 by 4 matrix whose last column Finish...
Definition render.h:30
Captured particle pool and list indices for one race simulation frame.
Definition particlesnapshot.h:6
A racer of a race.
Definition racerslot.h:28
A vehicle.
Definition vehicle.h:143
The rectangle of the screen a view fills.
Definition render.h:134
The vehicles of a race, the cars they are, and their place on the track.