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 "kernel.h"
5
6#include <base/hash.h>
7
9
11{
12public:
14 char m_aMap[64];
16 int m_Time;
17};
18
20{
21 MACRO_INTERFACE("ghostrecorder")
22public:
23 virtual int Start(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, const char *pName) = 0;
24 virtual void Stop(int Ticks, int Time) = 0;
25
26 virtual void WriteData(int Type, const void *pData, size_t Size) = 0;
27 virtual bool IsRecording() const = 0;
28};
29
31{
32 MACRO_INTERFACE("ghostloader")
33public:
34 virtual bool Load(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc) = 0;
35 virtual void Close() = 0;
36
37 virtual const CGhostInfo *GetInfo() const = 0;
38
39 virtual bool ReadNextType(int *pType) = 0;
40 virtual bool ReadData(int Type, void *pData, size_t Size) = 0;
41
42 virtual bool GetGhostInfo(const char *pFilename, CGhostInfo *pInfo, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc) = 0;
43};
44
45#endif
Definition ghost.h:11
int m_NumTicks
Definition ghost.h:15
char m_aMap[64]
Definition ghost.h:14
char m_aOwner[MAX_NAME_LENGTH]
Definition ghost.h:13
int m_Time
Definition ghost.h:16
Definition ghost.h:31
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:20
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
IInterface()
Definition kernel.h:19
@ MAX_NAME_LENGTH
Definition protocol.h:99
#define MACRO_INTERFACE(Name)
Definition kernel.h:25
Definition hash.h:15