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 /common/replay/performance.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'common/replay/performance.h')
| -rw-r--r-- | common/replay/performance.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/common/replay/performance.h b/common/replay/performance.h new file mode 100644 index 0000000..a38e116 --- /dev/null +++ b/common/replay/performance.h @@ -0,0 +1,63 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +//=======================================================================================// + +#ifndef REPLAYPERFORMANCE_H +#define REPLAYPERFORMANCE_H +#ifdef _WIN32 +#pragma once +#endif + +//---------------------------------------------------------------------------------------- + +#include "shared_defs.h" +#include "qlimits.h" + +//---------------------------------------------------------------------------------------- + +class CReplay; +class KeyValues; + +//---------------------------------------------------------------------------------------- + +class CReplayPerformance +{ +public: + CReplayPerformance( CReplay *pReplay ); + + inline bool HasInTick() const { return m_nTickIn >= 0; } + inline bool HasOutTick() const { return m_nTickOut >= 0; } + + inline int GetTickIn() const { return m_nTickIn; } + inline int GetTickOut() const { return m_nTickOut; } + + void Copy( const CReplayPerformance *pSrc ); + void CopyTicks( const CReplayPerformance *pSrc ); + + void SetFilename( const char *pFilename ); + const char *GetFullPerformanceFilename(); + + void AutoNameIfHasNoTitle( const char *pMapName ); + void SetTitle( const wchar_t *pTitle ); + + // NOTE: Doesn't copy exactly - gets a valid filename for the returned performance. + CReplayPerformance *MakeCopy() const; + + void Read( KeyValues *pIn ); + void Write( KeyValues *pOut ); + + // NOTE: Any changes made here should be reflected in the copy constructor + // (which is called from MakeCopy()). + wchar_t m_wszTitle[MAX_TAKE_TITLE_LENGTH]; + char m_szBaseFilename[ MAX_OSPATH ]; + CReplay *m_pReplay; + int m_nTickIn; + int m_nTickOut; + +private: + CReplayPerformance( const CReplayPerformance *pPerformance ); +}; + +//---------------------------------------------------------------------------------------- + +#endif // REPLAYPERFORMANCE_H
\ No newline at end of file |