diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/demoinfo/tooldemofile.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/demoinfo/tooldemofile.h')
| -rw-r--r-- | utils/demoinfo/tooldemofile.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/utils/demoinfo/tooldemofile.h b/utils/demoinfo/tooldemofile.h new file mode 100644 index 0000000..e82e172 --- /dev/null +++ b/utils/demoinfo/tooldemofile.h @@ -0,0 +1,58 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef TOOLDEMOFILE_H +#define TOOLDEMOFILE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "mathlib/vector.h" +#include "tier0/platform.h" +#include "utlvector.h" +#include "filesystem.h" +#include "demofile/demoformat.h" + +class CUtlBuffer; + +class CToolDemoFile +{ +public: + CToolDemoFile(); + virtual ~CToolDemoFile(); + + bool Open(const char *name, bool bReadOnly); + bool IsOpen(); + void Close(); + + void SeekTo( int position ); + unsigned int GetCurPos(); + int GetSize(); + + int ReadRawData( char *buffer, int length ); + + void ReadSequenceInfo(int &nSeqNrIn, int &nSeqNrOutAck); + + void ReadCmdInfo( democmdinfo_t& info ); + + void ReadCmdHeader( unsigned char& cmd, int& tick ); + + const char *ReadConsoleCommand( void ); + + int ReadNetworkDataTables( CUtlBuffer *buf ); // if buf is NULL, skip it + + int ReadUserCmd( char *buffer, int &size ); + + demoheader_t *ReadDemoHeader(); + + +public: + FileHandle_t m_hDemoFile; // filesystem handle + char m_szFileName[MAX_PATH]; //name of current demo file + demoheader_t m_DemoHeader; //general demo info +}; + +#endif // TOOLDEMOFILE_H |