Counter Strike : Global Offensive Source Code
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.

76 lines
1.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef REPLAYDEMO_H
  7. #define REPLAYDEMO_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <filesystem.h>
  12. #include "demo.h"
  13. #include "demofile.h"
  14. #include "netmessages_signon.h"
  15. class CReplayFrame;
  16. class CReplayServer;
  17. class CReplayDemoRecorder : public IDemoRecorder
  18. {
  19. public:
  20. CReplayDemoRecorder( CReplayServer* pServer );
  21. virtual ~CReplayDemoRecorder();
  22. CDemoFile *GetDemoFile();
  23. int GetRecordingTick();
  24. void DumpToFile( char const *filename );
  25. void StartRecording( const char *filename, bool bContinuously );
  26. void StartAutoRecording();
  27. void SetSignonState( SIGNONSTATE state ) {}; // not need by Replay recorder
  28. bool IsRecording();
  29. void PauseRecording() {}
  30. void ResumeRecording() {}
  31. void StopRecording( const CGameInfo *pGameInfo = NULL );
  32. void RecordCommand( const char *cmdstring );
  33. void RecordUserInput( int cmdnumber ) {} ; // not need by Replay recorder
  34. void RecordMessages( bf_read &data, int bits );
  35. void RecordPacket();
  36. void RecordServerClasses( ServerClass *pClasses );
  37. void RecordStringTables();
  38. void RecordCustomData( int iCallbackIndex, const void *pData, size_t iDataLength );
  39. void ResetDemoInterpolation() {}
  40. void WriteFrame( CReplayFrame *pFrame );
  41. void CloseFile();
  42. void Reset();
  43. void WriteServerInfo();
  44. int WriteSignonData(); // write all necessary signon data and returns written bytes
  45. void WriteMessages( unsigned char cmd, bf_write &message );
  46. int GetMaxAckTickCount();
  47. void GetUniqueDemoFilename( char* pOut, int nLength );
  48. public:
  49. CDemoFile m_DemoFile;
  50. bool m_bIsRecording;
  51. int m_nFrameCount;
  52. int m_nStartTick;
  53. int m_SequenceInfo;
  54. int m_nDeltaTick;
  55. int m_nSignonTick;
  56. bf_write m_MessageData; // temp buffer for all network messages
  57. CReplayServer *m_pReplayServer;
  58. };
  59. #endif // REPLAYDEMO_H