Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef REPLAYPERFORMANCE_H
  5. #define REPLAYPERFORMANCE_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //----------------------------------------------------------------------------------------
  10. #include "shared_defs.h"
  11. #include "qlimits.h"
  12. //----------------------------------------------------------------------------------------
  13. class CReplay;
  14. class KeyValues;
  15. //----------------------------------------------------------------------------------------
  16. class CReplayPerformance
  17. {
  18. public:
  19. CReplayPerformance( CReplay *pReplay );
  20. inline bool HasInTick() const { return m_nTickIn >= 0; }
  21. inline bool HasOutTick() const { return m_nTickOut >= 0; }
  22. inline int GetTickIn() const { return m_nTickIn; }
  23. inline int GetTickOut() const { return m_nTickOut; }
  24. void Copy( const CReplayPerformance *pSrc );
  25. void CopyTicks( const CReplayPerformance *pSrc );
  26. void SetFilename( const char *pFilename );
  27. const char *GetFullPerformanceFilename();
  28. void AutoNameIfHasNoTitle( const char *pMapName );
  29. void SetTitle( const wchar_t *pTitle );
  30. // NOTE: Doesn't copy exactly - gets a valid filename for the returned performance.
  31. CReplayPerformance *MakeCopy() const;
  32. void Read( KeyValues *pIn );
  33. void Write( KeyValues *pOut );
  34. // NOTE: Any changes made here should be reflected in the copy constructor
  35. // (which is called from MakeCopy()).
  36. wchar_t m_wszTitle[MAX_TAKE_TITLE_LENGTH];
  37. char m_szBaseFilename[ MAX_OSPATH ];
  38. CReplay *m_pReplay;
  39. int m_nTickIn;
  40. int m_nTickOut;
  41. private:
  42. CReplayPerformance( const CReplayPerformance *pPerformance );
  43. };
  44. //----------------------------------------------------------------------------------------
  45. #endif // REPLAYPERFORMANCE_H