summaryrefslogtreecommitdiffstats
path: root/source/cChunkGenerator.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-25 13:55:20 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-25 13:55:20 +0100
commit81c73341b24688b290c91bddcf83c3f6d3621f1b (patch)
tree289cd3fd78b12f3df1ec2bd8418a834e0cd67668 /source/cChunkGenerator.h
parent- improved and simplified the door system (shorter, clearer) (diff)
downloadcuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar.gz
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar.bz2
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar.lz
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar.xz
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.tar.zst
cuberite-81c73341b24688b290c91bddcf83c3f6d3621f1b.zip
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