#include <C4Record.h>
Public Member Functions | |
C4Record () | |
C4Record (const char *szPlaybackFile, const char *szRecordFile, const char *szTempRecFile) | |
~C4Record () | |
bool | IsRecording () const |
unsigned int | GetStreamingPos () const |
const StdBuf & | GetStreamingBuf () const |
bool | Start (bool fInitial) |
bool | Stop (StdStrBuf *pRecordName=nullptr, BYTE *pRecordSHA1=nullptr) |
bool | Rec (const C4Control &Ctrl, int iFrame) |
bool | Rec (C4PacketType eCtrlType, C4ControlPacket *pCtrl, int iFrame) |
bool | Rec (int iFrame, const StdBuf &sBuf, C4RecordChunkType eType) |
bool | AddFile (const char *szLocalFilename, const char *szAddAs, bool fDelete=false) |
bool | StartStreaming (bool fInitial) |
void | ClearStreamingBuf (unsigned int iAmount) |
void | StopStreaming () |
CStdFile * | GetLogFile () |
Public Attributes | |
int | Index |
Definition at line 243 of file C4Record.h.
|
default |
C4Record::C4Record | ( | const char * | szPlaybackFile, |
const char * | szRecordFile, | ||
const char * | szTempRecFile | ||
) |
|
default |
bool C4Record::AddFile | ( | const char * | szLocalFilename, |
const char * | szAddAs, | ||
bool | fDelete = false |
||
) |
Definition at line 266 of file C4Record.cpp.
References C4Group::Add(), CopyItem(), EraseItem(), StdStrBuf::getData(), GetExtension(), MakeTempFilename(), C4Group::Move(), SEqualNoCase(), and C4Player::Strip().
Referenced by C4ControlJoinPlayer::PreRec(), and C4GameControl::RecAddFile().
void C4Record::ClearStreamingBuf | ( | unsigned int | iAmount | ) |
Definition at line 339 of file C4Record.cpp.
References StdBuf::Clear(), StdBuf::getSize(), StdBuf::Move(), and StdBuf::SetSize().
Referenced by C4Network2::StreamIn().
|
inline |
Definition at line 278 of file C4Record.h.
Referenced by LogSilent().
|
inline |
Definition at line 263 of file C4Record.h.
Referenced by C4Network2::DrawStatus(), and C4Network2::StreamIn().
|
inline |
Definition at line 262 of file C4Record.h.
Referenced by C4Network2::DrawStatus().
|
inline |
Definition at line 261 of file C4Record.h.
bool C4Record::Rec | ( | C4PacketType | eCtrlType, |
C4ControlPacket * | pCtrl, | ||
int | iFrame | ||
) |
Definition at line 224 of file C4Record.cpp.
References C4IDPacket::getPkt(), C4ControlPacket::PreRec(), RCT_CtrlPkt, and Rec().
bool C4Record::Rec | ( | const C4Control & | Ctrl, |
int | iFrame | ||
) |
Definition at line 211 of file C4Record.cpp.
References C4Control::Copy(), C4Control::firstPkt(), C4Control::PreRec(), and RCT_Ctrl.
Referenced by C4GameControl::DbgRec(), C4GameControl::ExecControl(), C4GameControl::ExecControlPacket(), C4GameControl::Execute(), Rec(), and C4GameControl::StartRecord().
bool C4Record::Rec | ( | int | iFrame, |
const StdBuf & | sBuf, | ||
C4RecordChunkType | eType | ||
) |
Definition at line 236 of file C4Record.cpp.
References CStdFile::Flush(), StdBuf::getData(), StdBuf::getSize(), RCT_Frame, Rec(), and CStdFile::Write().
bool C4Record::Start | ( | bool | fInitial | ) |
Definition at line 104 of file C4Record.cpp.
References _MAX_FNAME, _MAX_FNAME_LEN, _MAX_PATH_LEN, StdStrBuf::AppendFormat(), C4Config::AtUserDataPath(), C4CFN_CtrlRec, C4CFN_LogRec, C4CFN_Records, C4CFN_ScenarioFiles, C4Group_UnpackDirectory(), C4GameSave::Close(), Config, CStdFile::Create(), C4ConfigGeneral::CreateSaveFolder(), DirectoryExists(), DirSep, StdStrBuf::Format(), C4Game::FrameCounter, Game, C4Config::General, StdStrBuf::getData(), C4GameRes::getFile(), GetFilenameOnly(), Index, C4GameParameters::isLeague(), LoadResStr(), Log(), C4Group::Open(), C4Game::Parameters, C4GameSave::Save(), C4GameParameters::Scenario, SCopy(), SLen(), sprintf, and WildcardMatch().
Referenced by C4GameControl::StartRecord().
bool C4Record::StartStreaming | ( | bool | fInitial | ) |
Definition at line 311 of file C4Record.cpp.
References C4GameSave::Close(), EraseFile(), Game, StdStrBuf::getData(), Index, C4GameParameters::isLeague(), MakeTempFilename(), C4Game::Parameters, and C4GameSave::Save().
Referenced by C4GameControl::StartRecord().
Definition at line 169 of file C4Record.cpp.
References C4CFN_RecPlayerInfos, C4Group_PackDirectory(), C4Group::Close(), CStdFile::Close(), Config, StdStrBuf::Copy(), C4ConfigGeneral::DebugRec, DirectoryExists(), Game, C4Config::General, StdStrBuf::getData(), GetFileSHA1(), C4RecordChunkHead::iFrm, Index, C4GameParameters::isLeague(), C4Game::Parameters, C4Game::PlayerInfos, RCT_End, C4PlayerInfoList::Save(), C4GameSave::SaveDesc(), StopStreaming(), C4RecordChunkHead::Type, and CStdFile::Write().
Referenced by C4GameControl::StopRecord().
void C4Record::StopStreaming | ( | ) |
Definition at line 351 of file C4Record.cpp.
Referenced by Stop().
int C4Record::Index |
Definition at line 259 of file C4Record.h.
Referenced by Start(), StartStreaming(), and Stop().