2014-05-11 16:35:41 -04:00
|
|
|
|
|
|
|
// 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:
|
2014-05-22 15:47:56 -04:00
|
|
|
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);
|
2014-05-11 16:35:41 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
class cVillage; // fwd: VillageGen.cpp
|
|
|
|
|
2014-05-22 15:47:56 -04:00
|
|
|
/** The noise used for generating random numbers */
|
|
|
|
cNoise m_Noise;
|
|
|
|
|
2014-05-14 18:14:06 -04:00
|
|
|
/** Maximum depth of the generator tree*/
|
|
|
|
int m_MaxDepth;
|
2014-05-12 16:43:59 -04:00
|
|
|
|
|
|
|
/** Maximum size, in X/Z blocks, of the village (radius from the origin) */
|
|
|
|
int m_MaxSize;
|
2014-05-22 15:47:56 -04:00
|
|
|
|
|
|
|
/** 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;
|
2014-05-11 16:35:41 -04:00
|
|
|
|
|
|
|
/** 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;
|
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|