1
0

The subgenerators use cChunkDesc instead of raw arrays. cChunkDesc is based on cBlockArea. Initial version of Lakes generator.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1286 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-03-19 08:32:02 +00:00
parent 1c1bcf5c07
commit b4697ab9db
11 changed files with 324 additions and 171 deletions

View File

@@ -46,10 +46,7 @@ protected:
*/
void GenerateSingleTree(
int a_ChunkX, int a_ChunkZ, int a_Seq,
cChunkDef::BlockTypes & a_BlockTypes,
cChunkDef::BlockNibbles & a_BlockMetas,
const cChunkDef::HeightMap & a_Height,
const cChunkDef::BiomeMap & a_Biomes,
cChunkDesc & a_ChunkDesc,
sSetBlockVector & a_OutsideLogs,
sSetBlockVector & a_OutsideOther
) ;
@@ -57,8 +54,7 @@ protected:
/// Applies an image into chunk blockdata; all blocks outside the chunk will be appended to a_Overflow
void ApplyTreeImage(
int a_ChunkX, int a_ChunkZ,
cChunkDef::BlockTypes & a_BlockTypes,
cChunkDef::BlockNibbles & a_BlockMetas,
cChunkDesc & a_ChunkDesc,
const sSetBlockVector & a_Image,
sSetBlockVector & a_Overflow
);
@@ -100,15 +96,25 @@ class cStructGenLakes :
public cStructureGen
{
public:
cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid) : m_Noise(a_Seed), m_Seed(a_Seed), m_Fluid(a_Fluid) {}
cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid, cTerrainHeightGen & a_HeiGen) :
m_Noise(a_Seed),
m_Seed(a_Seed),
m_Fluid(a_Fluid),
m_HeiGen(a_HeiGen)
{
}
protected:
cNoise m_Noise;
int m_Seed;
BLOCKTYPE m_Fluid;
cNoise m_Noise;
int m_Seed;
BLOCKTYPE m_Fluid;
cTerrainHeightGen & m_HeiGen;
// cStructureGen override:
virtual void GenStructures(cChunkDesc & a_ChunkDesc) override;
/// Creates a lake image for the specified chunk into a_Lake
void CreateLakeImage(int a_ChunkX, int a_ChunkZ, cBlockArea & a_Lake);
} ;