diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-04 14:14:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-04 14:14:38 +0200 |
commit | 86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791 (patch) | |
tree | 1b5c702a9e9da9115e64c317bdad5aba3544d4a1 /src/Generating/VillageGen.h | |
parent | Implemented bed homes (diff) | |
parent | Merge pull request #1059 from mc-server/coverity_fixes (diff) | |
download | cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.gz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.bz2 cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.lz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.xz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.zst cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/VillageGen.h | 57 |
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; +} ; + + + + |