From 95eb3a7bd7a5c3017410b38594aca78387d6caa2 Mon Sep 17 00:00:00 2001 From: faketruth Date: Sun, 4 Mar 2012 15:59:10 +0000 Subject: Should have complete support for 256 blocks high worlds. Old save files are converted to new ones at load. BACK UP YOUR WORLD! git-svn-id: http://mc-server.googlecode.com/svn/trunk@358 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WSSCompact.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/WSSCompact.h') diff --git a/source/WSSCompact.h b/source/WSSCompact.h index 1cb8d161b..c42c8c5b9 100644 --- a/source/WSSCompact.h +++ b/source/WSSCompact.h @@ -12,6 +12,7 @@ #define WSSCOMPACT_H_INCLUDED #include "WorldStorage.h" +#include "Vector3i.h" @@ -47,6 +48,8 @@ protected: int GetLayerX(void) const {return m_LayerX; } int GetLayerZ(void) const {return m_LayerZ; } + static const int PAK_VERSION = 1; + static const int CHUNK_VERSION = 2; protected: AString m_FileName; @@ -57,10 +60,16 @@ protected: AString m_DataContents; // Data contents of the file, cached int m_NumDirty; // Number of chunks that were written into m_DataContents but not into the file + + Vector3i m_ChunkSize; // Is related to m_ChunkVersion + char m_ChunkVersion; + char m_PakVersion; bool LoadChunk(const cChunkCoords & a_Chunk, int a_Offset, sChunkHeader * a_Header, cWorld * a_World); bool SaveChunkToData(const cChunkCoords & a_Chunk, cWorld * a_World); // Saves the chunk to m_DataContents, updates headers and m_NumDirty void SynchronizeFile(void); // Writes m_DataContents along with the headers to file, resets m_NumDirty + + void UpdateChunk1To2(void); } ; typedef std::list cPAKFiles; -- cgit v1.2.3