summaryrefslogtreecommitdiff
path: root/engine/hltvdemo.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/hltvdemo.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'engine/hltvdemo.h')
-rw-r--r--engine/hltvdemo.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/engine/hltvdemo.h b/engine/hltvdemo.h
new file mode 100644
index 0000000..422bcd8
--- /dev/null
+++ b/engine/hltvdemo.h
@@ -0,0 +1,70 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef HLTVDEMO_H
+#define HLTVDEMO_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <filesystem.h>
+
+#include "demo.h"
+#include "demofile.h"
+
+class CHLTVFrame;
+
+class CHLTVDemoRecorder : public IDemoRecorder
+{
+public:
+ CHLTVDemoRecorder();
+ virtual ~CHLTVDemoRecorder();
+
+ CDemoFile *GetDemoFile();
+ int GetRecordingTick( void );
+
+ void StartRecording( const char *filename, bool bContinuously );
+ void StartAutoRecording();
+ void SetSignonState( int state ) {}; // not need by HLTV recorder
+ bool IsRecording( void );
+ void PauseRecording( void ) {};
+ void ResumeRecording( void ) {};
+ void StopRecording( void );
+
+ void RecordCommand( const char *cmdstring );
+ void RecordUserInput( int cmdnumber ) {} ; // not need by HLTV recorder
+ void RecordMessages( bf_read &data, int bits );
+ void RecordPacket( void );
+ void RecordServerClasses( ServerClass *pClasses );
+ void RecordStringTables();
+
+ void ResetDemoInterpolation( void ) {};
+
+public:
+ void WriteFrame( CHLTVFrame *pFrame );
+ void CloseFile();
+ void Reset();
+
+ void WriteServerInfo();
+ int WriteSignonData(); // write all necessary signon data and returns written bytes
+ void WriteMessages( unsigned char cmd, bf_write &message );
+ int GetMaxAckTickCount();
+
+public:
+
+ CDemoFile m_DemoFile;
+ bool m_bIsRecording;
+ int m_nFrameCount;
+ float m_nStartTick;
+ int m_SequenceInfo;
+ int m_nDeltaTick;
+ int m_nSignonTick;
+ bf_write m_MessageData; // temp buffer for all network messages
+};
+
+
+
+#endif // HLTVDEMO_H