GekkoNet 1.0
C/C++ Peer to Peer Game Networking SDK
Loading...
Searching...
No Matches
Gekko::ReplaySystem Struct Reference

#include <replay.h>

Collaboration diagram for Gekko::ReplaySystem:

Public Member Functions

bool StartRecording (GekkoConfig config, Frame frame, bool save_state, bool disable_compression)
const u8 * StopRecording (u32 &length)
const u8 * PeekRecording (u32 &length)
void RecordInputs (SyncSystem &sync)
void RecordState (const u8 *state, u32 length, Frame frame)
bool SetChecksumInterval (u32 interval)
bool SetUserData (const u8 *data, u32 length)
void RecordChecksums (StateStorage &storage, Frame up_to)
void RecordChecksum (Frame frame, u32 checksum)
bool WantsChecksum (Frame frame) const
bool NeedsState ()
StateEntry * PendingState ()
bool LoadReplay (const u8 *replay_data, u32 length)
const u8 * ReplayState ()
bool NextReplayInput (u8 *input)
bool RecordedChecksum (Frame frame, u32 &checksum)
const u8 * UserData (u32 &length) const
GekkoConfig Config ()
bool IsRecording () const
bool IsReplaying () const
void Reset ()

Private Types

enum  Mode { None , Recording , Replaying }

Private Member Functions

void RecordInput (Frame frame, const u8 *input)
void RecordPendingState ()
const u8 * Serialize (u32 &length)
u32 InputSize () const
bool ValidChecksums () const

Private Attributes

enum Gekko::ReplaySystem::Mode _mode = None
bool _needs_state = false
bool _pending_state = false
bool _no_compression = false
Frame _start_frame = 0
Frame _current_frame = 0
Frame _last_recorded_frame = GameInput::NULL_FRAME
Frame _last_checksum_frame = GameInput::NULL_FRAME
u32 _next_checksum = 0
std::vector< u8 > _bin_buffer
StateEntry _state
ReplayBlob _replay

Detailed Description

Definition at line 38 of file replay.h.

Member Enumeration Documentation

◆ Mode

Enumerator
None 
Recording 
Replaying 

Definition at line 82 of file replay.h.

Member Function Documentation

◆ Config()

GekkoConfig Gekko::ReplaySystem::Config ( )

Definition at line 407 of file replay.cpp.

◆ InputSize()

u32 Gekko::ReplaySystem::InputSize ( ) const
private

Definition at line 442 of file replay.cpp.

Here is the caller graph for this function:

◆ IsRecording()

bool Gekko::ReplaySystem::IsRecording ( ) const

Definition at line 412 of file replay.cpp.

◆ IsReplaying()

bool Gekko::ReplaySystem::IsReplaying ( ) const

Definition at line 417 of file replay.cpp.

◆ LoadReplay()

bool Gekko::ReplaySystem::LoadReplay ( const u8 * replay_data,
u32 length )

Definition at line 259 of file replay.cpp.

Here is the call graph for this function:

◆ NeedsState()

bool Gekko::ReplaySystem::NeedsState ( )

Definition at line 236 of file replay.cpp.

Here is the call graph for this function:

◆ NextReplayInput()

bool Gekko::ReplaySystem::NextReplayInput ( u8 * input)

Definition at line 362 of file replay.cpp.

Here is the call graph for this function:

◆ PeekRecording()

const u8 * Gekko::ReplaySystem::PeekRecording ( u32 & length)

Definition at line 51 of file replay.cpp.

Here is the call graph for this function:

◆ PendingState()

Gekko::StateEntry * Gekko::ReplaySystem::PendingState ( )

Definition at line 243 of file replay.cpp.

◆ RecordChecksum()

void Gekko::ReplaySystem::RecordChecksum ( Frame frame,
u32 checksum )

Definition at line 227 of file replay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordChecksums()

void Gekko::ReplaySystem::RecordChecksums ( StateStorage & storage,
Frame up_to )

Definition at line 212 of file replay.cpp.

Here is the call graph for this function:

◆ RecordedChecksum()

bool Gekko::ReplaySystem::RecordedChecksum ( Frame frame,
u32 & checksum )

Definition at line 378 of file replay.cpp.

◆ RecordInput()

void Gekko::ReplaySystem::RecordInput ( Frame frame,
const u8 * input )
private

Definition at line 145 of file replay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordInputs()

void Gekko::ReplaySystem::RecordInputs ( SyncSystem & sync)

Definition at line 121 of file replay.cpp.

Here is the call graph for this function:

◆ RecordPendingState()

void Gekko::ReplaySystem::RecordPendingState ( )
private

Definition at line 250 of file replay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordState()

void Gekko::ReplaySystem::RecordState ( const u8 * state,
u32 length,
Frame frame )

Definition at line 163 of file replay.cpp.

Here is the caller graph for this function:

◆ ReplayState()

const u8 * Gekko::ReplaySystem::ReplayState ( )

Definition at line 355 of file replay.cpp.

◆ Reset()

void Gekko::ReplaySystem::Reset ( )

Definition at line 422 of file replay.cpp.

Here is the caller graph for this function:

◆ Serialize()

const u8 * Gekko::ReplaySystem::Serialize ( u32 & length)
private

Definition at line 60 of file replay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetChecksumInterval()

bool Gekko::ReplaySystem::SetChecksumInterval ( u32 interval)

Definition at line 180 of file replay.cpp.

◆ SetUserData()

bool Gekko::ReplaySystem::SetUserData ( const u8 * data,
u32 length )

Definition at line 189 of file replay.cpp.

◆ StartRecording()

bool Gekko::ReplaySystem::StartRecording ( GekkoConfig config,
Frame frame,
bool save_state,
bool disable_compression )

Definition at line 10 of file replay.cpp.

Here is the call graph for this function:

◆ StopRecording()

const u8 * Gekko::ReplaySystem::StopRecording ( u32 & length)

Definition at line 38 of file replay.cpp.

Here is the call graph for this function:

◆ UserData()

const u8 * Gekko::ReplaySystem::UserData ( u32 & length) const

Definition at line 396 of file replay.cpp.

◆ ValidChecksums()

bool Gekko::ReplaySystem::ValidChecksums ( ) const
private

Definition at line 447 of file replay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WantsChecksum()

bool Gekko::ReplaySystem::WantsChecksum ( Frame frame) const

Definition at line 203 of file replay.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _bin_buffer

std::vector<u8> Gekko::ReplaySystem::_bin_buffer
private

Definition at line 99 of file replay.h.

◆ _current_frame

Frame Gekko::ReplaySystem::_current_frame = 0
private

Definition at line 93 of file replay.h.

◆ _last_checksum_frame

Frame Gekko::ReplaySystem::_last_checksum_frame = GameInput::NULL_FRAME
private

Definition at line 95 of file replay.h.

◆ _last_recorded_frame

Frame Gekko::ReplaySystem::_last_recorded_frame = GameInput::NULL_FRAME
private

Definition at line 94 of file replay.h.

◆ _mode

enum Gekko::ReplaySystem::Mode Gekko::ReplaySystem::_mode = None
private

◆ _needs_state

bool Gekko::ReplaySystem::_needs_state = false
private

Definition at line 88 of file replay.h.

◆ _next_checksum

u32 Gekko::ReplaySystem::_next_checksum = 0
private

Definition at line 97 of file replay.h.

◆ _no_compression

bool Gekko::ReplaySystem::_no_compression = false
private

Definition at line 90 of file replay.h.

◆ _pending_state

bool Gekko::ReplaySystem::_pending_state = false
private

Definition at line 89 of file replay.h.

◆ _replay

ReplayBlob Gekko::ReplaySystem::_replay
private

Definition at line 103 of file replay.h.

◆ _start_frame

Frame Gekko::ReplaySystem::_start_frame = 0
private

Definition at line 92 of file replay.h.

◆ _state

StateEntry Gekko::ReplaySystem::_state
private

Definition at line 101 of file replay.h.


The documentation for this struct was generated from the following files: