DDraceNetwork Docs
CDemoPlayer Class Reference

#include <demo.h>

Inheritance diagram for CDemoPlayer:
[legend]
Collaboration diagram for CDemoPlayer:
[legend]

Classes

struct  CPlaybackInfo
 
class  IListener
 
struct  SKeyFrame
 

Public Member Functions

 CDemoPlayer (class CSnapshotDelta *pSnapshotDelta, bool UseVideo)
 
 CDemoPlayer (class CSnapshotDelta *pSnapshotDelta, bool UseVideo, TUpdateIntraTimesFunc &&UpdateIntraTimesFunc)
 
 ~CDemoPlayer () override
 
void Construct (class CSnapshotDelta *pSnapshotDelta, bool UseVideo)
 
void SetListener (IListener *pListener)
 
int Load (class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, int StorageType)
 
unsigned char * GetMapData (class IStorage *pStorage)
 
bool ExtractMap (class IStorage *pStorage)
 
int Play ()
 
void Pause () override
 
void Unpause () override
 
void Stop (const char *pErrorMessage="")
 
void SetSpeed (float Speed) override
 
void SetSpeedIndex (int SpeedIndex) override
 
void AdjustSpeedIndex (int Offset) override
 
int SeekPercent (float Percent) override
 
int SeekTime (float Seconds) override
 
int SeekTick (ETickOffset TickOffset) override
 
int SetPos (int WantedTick) override
 
const CInfoBaseInfo () const override
 
void GetDemoName (char *pBuffer, size_t BufferSize) const override
 
bool GetDemoInfo (class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, int StorageType, CDemoHeader *pDemoHeader, CTimelineMarkers *pTimelineMarkers, CMapInfo *pMapInfo, IOHANDLE *pFile=nullptr, char *pErrorMessage=nullptr, size_t ErrorMessageSize=0) const override
 
const char * Filename () const
 
const char * ErrorMessage () const override
 
int Update (bool RealTime=true)
 
bool IsSixup () const
 
const CPlaybackInfoInfo () const
 
bool IsPlaying () const override
 
const CMapInfoGetMapInfo () const
 
- Public Member Functions inherited from IDemoPlayer
virtual ~IDemoPlayer ()
 
virtual void SetSpeed (float Speed)=0
 
virtual void SetSpeedIndex (int SpeedIndex)=0
 
virtual void AdjustSpeedIndex (int Offset)=0
 
virtual int SeekPercent (float Percent)=0
 
virtual int SeekTime (float Seconds)=0
 
virtual int SeekTick (ETickOffset TickOffset)=0
 
virtual int SetPos (int WantedTick)=0
 
virtual void Pause ()=0
 
virtual void Unpause ()=0
 
virtual const char * ErrorMessage () const =0
 
virtual bool IsPlaying () const =0
 
virtual const CInfoBaseInfo () const =0
 
virtual void GetDemoName (char *pBuffer, size_t BufferSize) const =0
 
virtual bool GetDemoInfo (class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, int StorageType, CDemoHeader *pDemoHeader, CTimelineMarkers *pTimelineMarkers, CMapInfo *pMapInfo, IOHANDLE *pFile=nullptr, char *pErrorMessage=nullptr, size_t ErrorMessageSize=0) const =0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Private Types

enum  EReadChunkHeaderResult { CHUNKHEADER_SUCCESS , CHUNKHEADER_ERROR , CHUNKHEADER_EOF }
 

Private Member Functions

EReadChunkHeaderResult ReadChunkHeader (int *pType, int *pSize, int *pTick)
 
void DoTick ()
 
bool ScanFile ()
 
int64_t Time ()
 

Private Attributes

IListenerm_pListener
 
TUpdateIntraTimesFunc m_UpdateIntraTimesFunc
 
class IConsolem_pConsole
 
IOHANDLE m_File
 
int64_t m_MapOffset
 
char m_aFilename [IO_MAX_PATH_LENGTH]
 
char m_aErrorMessage [256]
 
std::vector< SKeyFramem_vKeyFrames
 
CMapInfo m_MapInfo
 
int m_SpeedIndex
 
CPlaybackInfo m_Info
 
unsigned char m_aCompressedSnapshotData [CSnapshot::MAX_SIZE]
 
unsigned char m_aDecompressedSnapshotData [CSnapshot::MAX_SIZE]
 
unsigned char m_aChunkData [CSnapshot::MAX_SIZE]
 
unsigned char m_aSnapshot [CSnapshot::MAX_SIZE]
 
unsigned char m_aLastSnapshotData [CSnapshot::MAX_SIZE]
 
int m_LastSnapshotDataSize
 
class CSnapshotDeltam_pSnapshotDelta
 
bool m_UseVideo
 
bool m_WasRecording = false
 
bool m_Sixup
 

Additional Inherited Members

- Public Types inherited from IDemoPlayer
enum  ETickOffset { TICK_CURRENT , TICK_PREVIOUS , TICK_NEXT }
 
- Static Public Member Functions inherited from IDemoPlayer
static const char * InterfaceName ()
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Enumeration Documentation

◆ EReadChunkHeaderResult

Enumerator
CHUNKHEADER_SUCCESS 
CHUNKHEADER_ERROR 
CHUNKHEADER_EOF 

Constructor & Destructor Documentation

◆ CDemoPlayer() [1/2]

CDemoPlayer::CDemoPlayer ( class CSnapshotDelta pSnapshotDelta,
bool  UseVideo 
)

◆ CDemoPlayer() [2/2]

CDemoPlayer::CDemoPlayer ( class CSnapshotDelta pSnapshotDelta,
bool  UseVideo,
TUpdateIntraTimesFunc &&  UpdateIntraTimesFunc 
)

◆ ~CDemoPlayer()

CDemoPlayer::~CDemoPlayer ( )
override

Member Function Documentation

◆ AdjustSpeedIndex()

void CDemoPlayer::AdjustSpeedIndex ( int  Offset)
overridevirtual

Implements IDemoPlayer.

◆ BaseInfo()

const CInfo * CDemoPlayer::BaseInfo ( ) const
inlineoverridevirtual

Implements IDemoPlayer.

◆ Construct()

void CDemoPlayer::Construct ( class CSnapshotDelta pSnapshotDelta,
bool  UseVideo 
)

◆ DoTick()

void CDemoPlayer::DoTick ( )
private

◆ ErrorMessage()

const char * CDemoPlayer::ErrorMessage ( ) const
inlineoverridevirtual

Implements IDemoPlayer.

◆ ExtractMap()

bool CDemoPlayer::ExtractMap ( class IStorage pStorage)

◆ Filename()

const char * CDemoPlayer::Filename ( ) const
inline

◆ GetDemoInfo()

bool CDemoPlayer::GetDemoInfo ( class IStorage pStorage,
class IConsole pConsole,
const char *  pFilename,
int  StorageType,
CDemoHeader pDemoHeader,
CTimelineMarkers pTimelineMarkers,
CMapInfo pMapInfo,
IOHANDLE pFile = nullptr,
char *  pErrorMessage = nullptr,
size_t  ErrorMessageSize = 0 
) const
overridevirtual

Implements IDemoPlayer.

◆ GetDemoName()

void CDemoPlayer::GetDemoName ( char *  pBuffer,
size_t  BufferSize 
) const
overridevirtual

Implements IDemoPlayer.

◆ GetMapData()

unsigned char * CDemoPlayer::GetMapData ( class IStorage pStorage)

◆ GetMapInfo()

const CMapInfo * CDemoPlayer::GetMapInfo ( ) const
inline

◆ Info()

const CPlaybackInfo * CDemoPlayer::Info ( ) const
inline

◆ IsPlaying()

bool CDemoPlayer::IsPlaying ( ) const
inlineoverridevirtual

Implements IDemoPlayer.

◆ IsSixup()

bool CDemoPlayer::IsSixup ( ) const
inline

◆ Load()

int CDemoPlayer::Load ( class IStorage pStorage,
class IConsole pConsole,
const char *  pFilename,
int  StorageType 
)

◆ Pause()

void CDemoPlayer::Pause ( )
overridevirtual

Implements IDemoPlayer.

◆ Play()

int CDemoPlayer::Play ( )

◆ ReadChunkHeader()

CDemoPlayer::EReadChunkHeaderResult CDemoPlayer::ReadChunkHeader ( int *  pType,
int *  pSize,
int *  pTick 
)
private

◆ ScanFile()

bool CDemoPlayer::ScanFile ( )
private

◆ SeekPercent()

int CDemoPlayer::SeekPercent ( float  Percent)
overridevirtual

Implements IDemoPlayer.

◆ SeekTick()

int CDemoPlayer::SeekTick ( ETickOffset  TickOffset)
overridevirtual

Implements IDemoPlayer.

◆ SeekTime()

int CDemoPlayer::SeekTime ( float  Seconds)
overridevirtual

Implements IDemoPlayer.

◆ SetListener()

void CDemoPlayer::SetListener ( IListener pListener)

◆ SetPos()

int CDemoPlayer::SetPos ( int  WantedTick)
overridevirtual

Implements IDemoPlayer.

◆ SetSpeed()

void CDemoPlayer::SetSpeed ( float  Speed)
overridevirtual

Implements IDemoPlayer.

◆ SetSpeedIndex()

void CDemoPlayer::SetSpeedIndex ( int  SpeedIndex)
overridevirtual

Implements IDemoPlayer.

◆ Stop()

void CDemoPlayer::Stop ( const char *  pErrorMessage = "")

◆ Time()

int64_t CDemoPlayer::Time ( )
private

◆ Unpause()

void CDemoPlayer::Unpause ( )
overridevirtual

Implements IDemoPlayer.

◆ Update()

int CDemoPlayer::Update ( bool  RealTime = true)

Member Data Documentation

◆ m_aChunkData

unsigned char CDemoPlayer::m_aChunkData[CSnapshot::MAX_SIZE]
private

◆ m_aCompressedSnapshotData

unsigned char CDemoPlayer::m_aCompressedSnapshotData[CSnapshot::MAX_SIZE]
private

◆ m_aDecompressedSnapshotData

unsigned char CDemoPlayer::m_aDecompressedSnapshotData[CSnapshot::MAX_SIZE]
private

◆ m_aErrorMessage

char CDemoPlayer::m_aErrorMessage[256]
private

◆ m_aFilename

char CDemoPlayer::m_aFilename[IO_MAX_PATH_LENGTH]
private

◆ m_aLastSnapshotData

unsigned char CDemoPlayer::m_aLastSnapshotData[CSnapshot::MAX_SIZE]
private

◆ m_aSnapshot

unsigned char CDemoPlayer::m_aSnapshot[CSnapshot::MAX_SIZE]
private

◆ m_File

IOHANDLE CDemoPlayer::m_File
private

◆ m_Info

CPlaybackInfo CDemoPlayer::m_Info
private

◆ m_LastSnapshotDataSize

int CDemoPlayer::m_LastSnapshotDataSize
private

◆ m_MapInfo

CMapInfo CDemoPlayer::m_MapInfo
private

◆ m_MapOffset

int64_t CDemoPlayer::m_MapOffset
private

◆ m_pConsole

class IConsole* CDemoPlayer::m_pConsole
private

◆ m_pListener

IListener* CDemoPlayer::m_pListener
private

◆ m_pSnapshotDelta

class CSnapshotDelta* CDemoPlayer::m_pSnapshotDelta
private

◆ m_Sixup

bool CDemoPlayer::m_Sixup
private

◆ m_SpeedIndex

int CDemoPlayer::m_SpeedIndex
private

◆ m_UpdateIntraTimesFunc

TUpdateIntraTimesFunc CDemoPlayer::m_UpdateIntraTimesFunc
private

◆ m_UseVideo

bool CDemoPlayer::m_UseVideo
private

◆ m_vKeyFrames

std::vector<SKeyFrame> CDemoPlayer::m_vKeyFrames
private

◆ m_WasRecording

bool CDemoPlayer::m_WasRecording = false
private

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