summaryrefslogtreecommitdiffstats
path: root/source/cChunkGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/cChunkGenerator.h')
-rw-r--r--source/cChunkGenerator.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/cChunkGenerator.h b/source/cChunkGenerator.h
new file mode 100644
index 000000000..df29a3e60
--- /dev/null
+++ b/source/cChunkGenerator.h
@@ -0,0 +1,23 @@
+#pragma once
+
+class cChunk;
+class cChunkMap;
+class cChunkGenerator
+{
+public:
+ cChunkGenerator( cChunkMap* a_pChunkMap );
+ ~cChunkGenerator();
+
+ void GenerateChunk( int a_X, int a_Z );
+
+ cChunk* GetCurrentlyGenerating(); // WARNING - Be sure to Lock() before calling, and Unlock() after done with the chunk!
+ void Lock();
+ void Unlock();
+private:
+ static void GenerateThread( void* a_Params );
+
+ cChunkMap* m_pChunkMap;
+
+ struct sChunkGeneratorState;
+ sChunkGeneratorState* m_pState;
+}; \ No newline at end of file