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

#include <sync.h>

Collaboration diagram for Gekko::SyncSystem:

Public Member Functions

 SyncSystem ()
void Init (u8 num_players, u32 input_size, u32 buffer_size=InputBuffer::DEFAULT_BUFF_SIZE)
void AddLocalInput (Handle player, u8 *input)
void AddRemoteInput (Handle player, u8 *input, Frame frame)
void OverwriteInput (Handle player, u8 *input, Frame frame)
void IncrementFrame ()
bool GetCurrentInputs (std::unique_ptr< u8[]> &inputs, Frame &frame)
void SetRunaheadMode (bool running_ahead)
bool GetSpectatorInputs (std::unique_ptr< u8[]> &inputs, Frame frame)
bool GetLocalInput (Handle player, std::unique_ptr< u8[]> &input, Frame frame)
void SetLocalDelay (Handle player, u8 delay)
u8 GetLocalDelay (Handle player)
void SetInputPredictionWindow (Handle player, u8 input_window)
Frame GetCurrentFrame () const
void SetCurrentFrame (Frame frame)
Frame GetMinIncorrectFrame ()
Frame GetMinReceivedFrame ()
Frame GetLastReceivedFrom (Handle player)
void SetLastReceivedFrame (Frame frame)
void ClearIncorrectFramesUpTo (Frame clear_limit)

Private Attributes

u8 _num_players
u32 _input_size
Frame _current_frame
std::unique_ptr< InputBuffer[]> _input_buffers

Detailed Description

Definition at line 10 of file sync.h.

Constructor & Destructor Documentation

◆ SyncSystem()

Gekko::SyncSystem::SyncSystem ( )

Definition at line 7 of file sync.cpp.

Member Function Documentation

◆ AddLocalInput()

void Gekko::SyncSystem::AddLocalInput ( Handle player,
u8 * input )

Definition at line 28 of file sync.cpp.

◆ AddRemoteInput()

void Gekko::SyncSystem::AddRemoteInput ( Handle player,
u8 * input,
Frame frame )

Definition at line 38 of file sync.cpp.

◆ ClearIncorrectFramesUpTo()

void Gekko::SyncSystem::ClearIncorrectFramesUpTo ( Frame clear_limit)

Definition at line 177 of file sync.cpp.

◆ GetCurrentFrame()

Frame Gekko::SyncSystem::GetCurrentFrame ( ) const

Definition at line 128 of file sync.cpp.

Here is the caller graph for this function:

◆ GetCurrentInputs()

bool Gekko::SyncSystem::GetCurrentInputs ( std::unique_ptr< u8[]> & inputs,
Frame & frame )

Definition at line 86 of file sync.cpp.

Here is the caller graph for this function:

◆ GetLastReceivedFrom()

Frame Gekko::SyncSystem::GetLastReceivedFrom ( Handle player)

Definition at line 161 of file sync.cpp.

◆ GetLocalDelay()

u8 Gekko::SyncSystem::GetLocalDelay ( Handle player)

Definition at line 118 of file sync.cpp.

◆ GetLocalInput()

bool Gekko::SyncSystem::GetLocalInput ( Handle player,
std::unique_ptr< u8[]> & input,
Frame frame )

Definition at line 103 of file sync.cpp.

◆ GetMinIncorrectFrame()

Frame Gekko::SyncSystem::GetMinIncorrectFrame ( )

Definition at line 138 of file sync.cpp.

Here is the caller graph for this function:

◆ GetMinReceivedFrame()

Frame Gekko::SyncSystem::GetMinReceivedFrame ( )

Definition at line 151 of file sync.cpp.

Here is the caller graph for this function:

◆ GetSpectatorInputs()

bool Gekko::SyncSystem::GetSpectatorInputs ( std::unique_ptr< u8[]> & inputs,
Frame frame )

Definition at line 63 of file sync.cpp.

Here is the caller graph for this function:

◆ IncrementFrame()

void Gekko::SyncSystem::IncrementFrame ( )

Definition at line 58 of file sync.cpp.

◆ Init()

void Gekko::SyncSystem::Init ( u8 num_players,
u32 input_size,
u32 buffer_size = InputBuffer::DEFAULT_BUFF_SIZE )

Definition at line 15 of file sync.cpp.

◆ OverwriteInput()

void Gekko::SyncSystem::OverwriteInput ( Handle player,
u8 * input,
Frame frame )

Definition at line 48 of file sync.cpp.

◆ SetCurrentFrame()

void Gekko::SyncSystem::SetCurrentFrame ( Frame frame)

Definition at line 133 of file sync.cpp.

◆ SetInputPredictionWindow()

void Gekko::SyncSystem::SetInputPredictionWindow ( Handle player,
u8 input_window )

Definition at line 123 of file sync.cpp.

◆ SetLastReceivedFrame()

void Gekko::SyncSystem::SetLastReceivedFrame ( Frame frame)

Definition at line 170 of file sync.cpp.

◆ SetLocalDelay()

void Gekko::SyncSystem::SetLocalDelay ( Handle player,
u8 delay )

Definition at line 113 of file sync.cpp.

◆ SetRunaheadMode()

void Gekko::SyncSystem::SetRunaheadMode ( bool running_ahead)

Definition at line 79 of file sync.cpp.

Member Data Documentation

◆ _current_frame

Frame Gekko::SyncSystem::_current_frame
private

Definition at line 57 of file sync.h.

◆ _input_buffers

std::unique_ptr<InputBuffer[]> Gekko::SyncSystem::_input_buffers
private

Definition at line 59 of file sync.h.

◆ _input_size

u32 Gekko::SyncSystem::_input_size
private

Definition at line 55 of file sync.h.

◆ _num_players

u8 Gekko::SyncSystem::_num_players
private

Definition at line 53 of file sync.h.


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