1#ifndef COASTLINE_REPLAY_H
2#define COASTLINE_REPLAY_H
15#if TGR_PLATFORM == TGR_PLATFORM_SDL || defined(_MSC_VER)
43extern u8 _ghostRecordingSegmentRomStart[];
44extern u8 _creditsRecordingSegmentRomStart[];
45extern u8 _endingRecordingSegmentRomStart[];
48#define ROM_GHOST_RECORDING ((u32)_ghostRecordingSegmentRomStart)
51#define RECORDING_CAPACITY 0xDE5C
97#if TGR_PLATFORM == TGR_PLATFORM_N64
120#define LAST_LAP_RECORDING_SIZE 0x3840
135#if TGR_PLATFORM == TGR_PLATFORM_SDL || defined(_MSC_VER)
137#define g_aLastLapBuffers ((LastLapBuffer *)g_aVehicleModels)
146#define LAST_LAP_FIRST_SLOT 15
148#define LAST_LAP_FIRST_SLOT 3
182#define PAUSED_CLOCK_STATE_SIZE 0x40
196#if !TGR_BOSS_RALLY && (TGR_REGION == TGR_REGION_JP || TGR_REGION == TGR_REGION_EU)
277#if TGR_PLATFORM == TGR_PLATFORM_N64
291#if TGR_REGION == TGR_REGION_JP || TGR_REGION == TGR_REGION_EU
unsigned g_dwGhostRecordingSize
The number of metadata bytes written before the frames.
s32 g_dwReplayKeyframeFrameCount
The frames RestoreReplayKeyframeState() has run.
void RestoreRaceSnapshot(LastLapBuffer *buffer)
Restore the state of the race from a snapshot SaveLastLapSnapshot() took.
void SaveRaceSnapshot(LastLapBuffer *buffer)
Take a snapshot of the race into the buffer of a last lap.
s32 g_adwReplayGhostSizes[]
The lengths of the instant replay recordings of the local players, in bytes.
#define PAUSED_CLOCK_STATE_SIZE
The bytes of the paused clock state.
Definition replay.h:182
u8 g_abPlaybackRecording[]
The buffer the recording a race replays is copied to.
SaveField g_aReplayKeyframeDescTable3[]
The third group of variables restored from a demo keyframe.
void RestoreReplayKeyframeState(void)
In the demo, restore the race from a keyframe when the recording of the first vehicle reaches one,...
s32 DeserializeSaveData(SaveField *fields, u8 *buffer, s32 offset)
Copy the variables of a list back from a buffer SerializeSaveData() filled.
#define g_aLastLapBuffers
Last-lap buffers share vehicle-model storage and descend through slots by local-player index.
Definition replay.h:137
s32 SerializeSaveData(SaveField *fields, u8 *buffer, s32 capacity, s32 offset)
Copy the variables of a list one after another into a buffer, and report when they overflow it.
SaveField g_aRaceSnapshotFields[]
The variables a snapshot of the race saves: the vehicles, the racers, the clocks, the sounds and more...
SaveField g_aPausedClockFields[]
The random seed and the clocks a pause keeps.
SaveField g_aReplayKeyframeDescTable2[]
The second group of variables restored from a demo keyframe.
u8 g_aabInputRecordings[][0xF000]
The buffers the input of each local player is recorded into, 0xF000 bytes apart.
u8 g_abGhostRecording[]
The recorded input of the ghost.
s32 g_dwBestReplayPlayer
The player whose recording the instant replay plays.
void SaveLastLapSnapshot(Vehicle *vehicle)
At the start of the last lap, give each local player a buffer to record the lap into and take a snaps...
#define LAST_LAP_RECORDING_SIZE
The bytes of the recording of each local player's input over the last lap.
Definition replay.h:120
SaveField g_aReplayKeyframeDescTable1[]
The variables a keyframe of the recording of the demo restores, in the order of the keyframe.
s32 g_dwBestReplayLength
The player whose recording the instant replay plays, and the length of that recording.
u8 * g_apReplayGhostPtrs[]
The recordings the instant replay gives each local player, and their lengths.
u8 g_abPausedClockState[PAUSED_CLOCK_STATE_SIZE]
Where a pause keeps them.
The last lap of a player: the input of each local player over it, and a snapshot of the race at its s...
Definition replay.h:126
u8 recordings[INPUT_RECORDERS][LAST_LAP_RECORDING_SIZE]
Definition replay.h:127
u8 snapshot[sizeof(VehicleModel) - INPUT_RECORDERS *LAST_LAP_RECORDING_SIZE]
Definition replay.h:128
A block of variables a snapshot saves, in a list ending in a NULL block.
Definition replay.h:152
void * data
Definition replay.h:153
u32 size
Definition replay.h:154
The model of a car as it is loaded from the cartridge.
Definition vehiclemodel.h:55
A vehicle.
Definition vehicle.h:143
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
The vehicles of a race, the cars they are, and their place on the track.