blob: e82e172bc7d385c37e041e4f6cee93144aa104d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef TOOLDEMOFILE_H
#define TOOLDEMOFILE_H
#ifdef _WIN32
#pragma once
#endif
#include "mathlib/vector.h"
#include "tier0/platform.h"
#include "utlvector.h"
#include "filesystem.h"
#include "demofile/demoformat.h"
class CUtlBuffer;
class CToolDemoFile
{
public:
CToolDemoFile();
virtual ~CToolDemoFile();
bool Open(const char *name, bool bReadOnly);
bool IsOpen();
void Close();
void SeekTo( int position );
unsigned int GetCurPos();
int GetSize();
int ReadRawData( char *buffer, int length );
void ReadSequenceInfo(int &nSeqNrIn, int &nSeqNrOutAck);
void ReadCmdInfo( democmdinfo_t& info );
void ReadCmdHeader( unsigned char& cmd, int& tick );
const char *ReadConsoleCommand( void );
int ReadNetworkDataTables( CUtlBuffer *buf ); // if buf is NULL, skip it
int ReadUserCmd( char *buffer, int &size );
demoheader_t *ReadDemoHeader();
public:
FileHandle_t m_hDemoFile; // filesystem handle
char m_szFileName[MAX_PATH]; //name of current demo file
demoheader_t m_DemoHeader; //general demo info
};
#endif // TOOLDEMOFILE_H
|