1
0
cuberite-2a/src/Protocol/ChunkDataSerializer.h
peterbell10 ee84197014
Force all headers other than "Globals.h" to be included with relative paths (#4269)
Closes #4236

CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/".

#include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-08-29 01:51:25 +01:00

48 lines
1.0 KiB
C++

// ChunkDataSerializer.h
// Interfaces to the cChunkDataSerializer class representing the object that can:
// - serialize chunk data to different protocol versions
// - cache such serialized data for multiple clients
#include "../ChunkData.h"
class cChunkDataSerializer
{
protected:
const cChunkData & m_Data;
const unsigned char * m_BiomeData;
const eDimension m_Dimension;
typedef std::map<int, AString> Serializations;
Serializations m_Serializations;
void Serialize47(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.8
void Serialize107(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.9
void Serialize110(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.9.4
public:
enum
{
RELEASE_1_8_0 = 47,
RELEASE_1_9_0 = 107,
RELEASE_1_9_4 = 110,
} ;
cChunkDataSerializer(
const cChunkData & a_Data,
const unsigned char * a_BiomeData,
const eDimension a_Dimension
);
const AString & Serialize(int a_Version, int a_ChunkX, int a_ChunkZ); // Returns one of the internal m_Serializations[]
} ;