DDraceNetwork Documentation
Loading...
Searching...
No Matches
ghost.h
Go to the documentation of this file.
1
#ifndef ENGINE_GHOST_H
2
#define ENGINE_GHOST_H
3
4
#include <
base/hash.h
>
5
#include <
engine/shared/protocol.h
>
6
7
#include "
kernel.h
"
8
9
class
CGhostInfo
10
{
11
public
:
12
char
m_aOwner
[
MAX_NAME_LENGTH
];
13
char
m_aMap
[64];
14
int
m_NumTicks
;
15
int
m_Time
;
16
};
17
18
class
IGhostRecorder
:
public
IInterface
19
{
20
MACRO_INTERFACE
(
"ghostrecorder"
)
21
public
:
22
virtual
~
IGhostRecorder
() =
default
;
23
24
virtual
int
Start
(
const
char
*
pFilename
,
const
char
*
pMap
,
const
SHA256_DIGEST
&
MapSha256
,
const
char
*
pName
) = 0;
25
virtual
void
Stop
(
int
Ticks
,
int
Time) = 0;
26
27
virtual
void
WriteData
(
int
Type,
const
void
*
pData
,
size_t
Size) = 0;
28
virtual
bool
IsRecording
()
const
= 0;
29
};
30
31
class
IGhostLoader
:
public
IInterface
32
{
33
MACRO_INTERFACE
(
"ghostloader"
)
34
public
:
35
virtual
~
IGhostLoader
() =
default
;
36
37
virtual
bool
Load(
const
char
*
pFilename
,
const
char
*
pMap
,
const
SHA256_DIGEST
&
MapSha256
,
unsigned
MapCrc
) = 0;
38
virtual
void
Close() = 0;
39
40
virtual
const
CGhostInfo
*GetInfo()
const
= 0;
41
42
virtual
bool
ReadNextType(
int
*
pType
) = 0;
43
virtual
bool
ReadData(
int
Type,
void
*
pData
,
size_t
Size) = 0;
44
45
virtual
bool
GetGhostInfo(
const
char
*
pFilename
,
CGhostInfo
*
pInfo
,
const
char
*
pMap
,
const
SHA256_DIGEST
&
MapSha256
,
unsigned
MapCrc
) = 0;
46
};
47
48
#endif
CGhostInfo
Definition
ghost.h:10
CGhostInfo::m_NumTicks
int m_NumTicks
Definition
ghost.h:14
CGhostInfo::m_aMap
char m_aMap[64]
Definition
ghost.h:13
CGhostInfo::m_aOwner
char m_aOwner[MAX_NAME_LENGTH]
Definition
ghost.h:12
CGhostInfo::m_Time
int m_Time
Definition
ghost.h:15
IGhostLoader
Definition
ghost.h:32
IGhostRecorder
Definition
ghost.h:19
IGhostRecorder::Stop
virtual void Stop(int Ticks, int Time)=0
IGhostRecorder::Start
virtual int Start(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, const char *pName)=0
IGhostRecorder::WriteData
virtual void WriteData(int Type, const void *pData, size_t Size)=0
IGhostRecorder::IsRecording
virtual bool IsRecording() const =0
IInterface
Definition
kernel.h:10
vector2_base
Definition
vmath.h:15
protocol.h
MAX_NAME_LENGTH
@ MAX_NAME_LENGTH
Definition
protocol.h:98
hash.h
kernel.h
MACRO_INTERFACE
#define MACRO_INTERFACE(Name)
Definition
kernel.h:25
SHA256_DIGEST
Definition
hash.h:15
src
engine
ghost.h
Generated by
1.9.8