aboutsummaryrefslogtreecommitdiff
path: root/sp/src/common/replay/performance.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/common/replay/performance.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/common/replay/performance.h')
-rw-r--r--sp/src/common/replay/performance.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/sp/src/common/replay/performance.h b/sp/src/common/replay/performance.h
new file mode 100644
index 00000000..e6541cd3
--- /dev/null
+++ b/sp/src/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