DDraceNetwork Docs
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>
6
7#include "kernel.h"
8
10{
11public:
13 char m_aMap[64];
15 int m_Time;
16};
17
19{
20 MACRO_INTERFACE("ghostrecorder")
21public:
22 virtual ~IGhostRecorder() {}
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
32{
33 MACRO_INTERFACE("ghostloader")
34public:
35 virtual ~IGhostLoader() {}
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
Definition: ghost.h:10
int m_NumTicks
Definition: ghost.h:14
char m_aMap[64]
Definition: ghost.h:13
char m_aOwner[MAX_NAME_LENGTH]
Definition: ghost.h:12
int m_Time
Definition: ghost.h:15
Definition: ghost.h:32
virtual bool GetGhostInfo(const char *pFilename, CGhostInfo *pInfo, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc)=0
virtual bool Load(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc)=0
virtual const CGhostInfo * GetInfo() const =0
virtual bool ReadData(int Type, void *pData, size_t Size)=0
virtual bool ReadNextType(int *pType)=0
virtual void Close()=0
Definition: ghost.h:19
virtual void Stop(int Ticks, int Time)=0
virtual int Start(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, const char *pName)=0
virtual void WriteData(int Type, const void *pData, size_t Size)=0
virtual bool IsRecording() const =0
Definition: kernel.h:10
@ MAX_NAME_LENGTH
Definition: protocol.h:97
#define MACRO_INTERFACE(Name)
Definition: kernel.h:25
Definition: hash.h:15