summaryrefslogtreecommitdiffstats
path: root/src/Generating/VillageGen.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-31 19:11:13 +0200
committerMattes D <github@xoft.cz>2014-05-31 19:11:13 +0200
commit6de45037c774f5fc748a4520b6f2afacdca94661 (patch)
treedc5908fdb33d679c05f10aa562ccbb107e7f3518 /src/Generating/VillageGen.h
parentMerge pull request #951 from worktycho/chunksparsing/structs (diff)
parentUpdated PlainsVillage prefabs. (diff)
downloadcuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.gz
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.bz2
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.lz
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.xz
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.zst
cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/VillageGen.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/Generating/VillageGen.h b/src/Generating/VillageGen.h
new file mode 100644
index 000000000..5faaae8a6
--- /dev/null
+++ b/src/Generating/VillageGen.h
@@ -0,0 +1,57 @@
+
+// VillageGen.h
+
+// Declares the cVillageGen class representing the village generator
+
+
+
+
+
+#pragma once
+
+#include "GridStructGen.h"
+#include "PrefabPiecePool.h"
+
+
+
+
+
+class cVillageGen :
+ public cGridStructGen
+{
+ typedef cGridStructGen super;
+public:
+ cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen);
+
+protected:
+ class cVillage; // fwd: VillageGen.cpp
+
+ /** The noise used for generating random numbers */
+ cNoise m_Noise;
+
+ /** Maximum depth of the generator tree*/
+ int m_MaxDepth;
+
+ /** Maximum size, in X/Z blocks, of the village (radius from the origin) */
+ int m_MaxSize;
+
+ /** Minimum density - percentage of allowed house connections. Range [0, 100] */
+ int m_MinDensity;
+
+ /** Maximum density - percentage of allowed house connections. Range [0, 100] */
+ int m_MaxDensity;
+
+ /** The underlying biome generator that defines whether the village is created or not */
+ cBiomeGen & m_BiomeGen;
+
+ /** The underlying height generator, used to position the prefabs crossing chunk borders */
+ cTerrainHeightGen & m_HeightGen;
+
+
+ // cGridStructGen overrides:
+ virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override;
+} ;
+
+
+
+