summaryrefslogtreecommitdiffstats
path: root/source/cChunkLoader.h
blob: aa6f3806f9a0d3996e2396ec53fef69f1f2e422d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

class cChunk;
class cChunkLoader
{
public:
	cChunkLoader();
	~cChunkLoader();

	cChunk* LoadChunk( int a_X, int a_Y, int a_Z );
	bool SaveChunk( const cChunk & a_Chunk );

	struct ChunkPack;
private:
	cChunk* LoadFormat1( int a_X, int a_Y, int a_Z );
	ChunkPack* LoadPak1( int PakX, int PakY, int PakZ ); // This loads a .pak file from disk and returns it, nothing more
	
	// Old stuffs
	cChunk* LoadOldFormat( int a_X, int a_Y, int a_Z );
	bool SaveOldFormat( const cChunk & a_Chunk );

	static void SaveThread( void* a_Param );

	bool m_bStop;
	cCriticalSection* m_CriticalSection;
	cEvent* m_Event;

	struct ChunkPacks; // Defined in .cpp
	ChunkPacks* m_ChunkPacks;
};