summaryrefslogtreecommitdiffstats
path: root/source/Generating/MineShafts.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-29 17:46:58 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-29 17:46:58 +0100
commita4963b69efff3bffeac40b1d22624f72007ac3b2 (patch)
tree108f01213c8296659f9e696f2063ae571aa1a7d2 /source/Generating/MineShafts.h
parentCuboid: Added the DifX/Y/Z functions (diff)
downloadcuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar.gz
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar.bz2
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar.lz
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar.xz
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.tar.zst
cuberite-a4963b69efff3bffeac40b1d22624f72007ac3b2.zip
Diffstat (limited to 'source/Generating/MineShafts.h')
-rw-r--r--source/Generating/MineShafts.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/source/Generating/MineShafts.h b/source/Generating/MineShafts.h
new file mode 100644
index 000000000..0d9b7436b
--- /dev/null
+++ b/source/Generating/MineShafts.h
@@ -0,0 +1,55 @@
+
+// MineShafts.h
+
+// Declares the cStructGenMineShafts class representing the structure generator for abandoned mineshafts
+
+
+
+
+
+#pragma once
+
+#include "ComposableGenerator.h"
+#include "../Noise.h"
+
+
+
+
+
+class cStructGenMineShafts :
+ public cStructureGen
+{
+public:
+ cStructGenMineShafts(int a_Seed, int a_GridSize, int a_MaxSystemSize);
+
+ virtual ~cStructGenMineShafts();
+
+protected:
+ friend class cMineShaft;
+ friend class cMineShaftDirtRoom;
+ friend class cMineShaftCorridor;
+ friend class cMineShaftCrossing;
+ friend class cMineShaftStaircase;
+ class cMineShaftSystem; // fwd: MineShafts.cpp
+ typedef std::list<cMineShaftSystem *> cMineShaftSystems;
+
+ cNoise m_Noise;
+ int m_GridSize; ///< Average spacing of the systems
+ int m_MaxSystemSize; ///< Maximum blcok size of a mineshaft system
+ cMineShaftSystems m_Cache; ///< Cache of the most recently used systems. MoveToFront used.
+
+ /// Clears everything from the cache
+ void ClearCache(void);
+
+ /** Returns all systems that *may* intersect the given chunk.
+ All the systems are valid until the next call to this function (which may delete some of the pointers).
+ */
+ void GetMineShaftSystemsForChunk(int a_ChunkX, int a_ChunkZ, cMineShaftSystems & a_MineShaftSystems);
+
+ // cStructureGen overrides:
+ virtual void GenStructures(cChunkDesc & a_ChunkDesc) override;
+} ;
+
+
+
+