From a54cbba0fdf697999e8ac4aff2f5ea436c98edc3 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 17 Jan 2014 11:01:14 -0800 Subject: Added user setting compression factor --- src/WorldStorage/WSSCompact.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/WorldStorage/WSSCompact.h') diff --git a/src/WorldStorage/WSSCompact.h b/src/WorldStorage/WSSCompact.h index 3223a986e..64b8d7f31 100644 --- a/src/WorldStorage/WSSCompact.h +++ b/src/WorldStorage/WSSCompact.h @@ -53,7 +53,7 @@ class cWSSCompact : public cWSSchema { public: - cWSSCompact(cWorld * a_World) : cWSSchema(a_World) {} + cWSSCompact(cWorld * a_World, int a_CompressionFactor) : cWSSchema(a_World), m_CompressionFactor(a_CompressionFactor) {} virtual ~cWSSCompact(); protected: @@ -74,7 +74,7 @@ protected: { public: - cPAKFile(const AString & a_FileName, int a_LayerX, int a_LayerZ); + cPAKFile(const AString & a_FileName, int a_LayerX, int a_LayerZ, int a_CompressionFactor); ~cPAKFile(); bool GetChunkData(const cChunkCoords & a_Chunk, int & a_UncompressedSize, AString & a_Data); @@ -95,6 +95,7 @@ protected: protected: AString m_FileName; + int m_CompressionFactor; int m_LayerX; int m_LayerZ; @@ -119,6 +120,8 @@ protected: cCriticalSection m_CS; cPAKFiles m_PAKFiles; // A MRU cache of PAK files + int m_CompressionFactor; + /// Loads the correct PAK file either from cache or from disk, manages the m_PAKFiles cache cPAKFile * LoadPAKFile(const cChunkCoords & a_Chunk); -- cgit v1.2.3