summaryrefslogtreecommitdiffstats
path: root/src/Generating/StructGen.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
commit42120e2ea5db0cdb9920ff1c5efef33e0f496d48 (patch)
tree20ba1ae0a53f757cb8814b6cd6a466fe5acf1308 /src/Generating/StructGen.h
parentFixed compile errors. (diff)
parentMerge pull request #1598 from mc-server/SignEditor (diff)
downloadcuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.gz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.bz2
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.lz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.xz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.zst
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/StructGen.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/Generating/StructGen.h b/src/Generating/StructGen.h
index 55d5bc1c7..906fdd722 100644
--- a/src/Generating/StructGen.h
+++ b/src/Generating/StructGen.h
@@ -24,7 +24,7 @@ class cStructGenTrees :
public cFinishGen
{
public:
- cStructGenTrees(int a_Seed, cBiomeGen * a_BiomeGen, cTerrainHeightGen * a_HeightGen, cTerrainCompositionGen * a_CompositionGen) :
+ cStructGenTrees(int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainHeightGenPtr a_HeightGen, cTerrainCompositionGenPtr a_CompositionGen) :
m_Seed(a_Seed),
m_Noise(a_Seed),
m_BiomeGen(a_BiomeGen),
@@ -36,9 +36,9 @@ protected:
int m_Seed;
cNoise m_Noise;
- cBiomeGen * m_BiomeGen;
- cTerrainHeightGen * m_HeightGen;
- cTerrainCompositionGen * m_CompositionGen;
+ cBiomeGenPtr m_BiomeGen;
+ cTerrainHeightGenPtr m_HeightGen;
+ cTerrainCompositionGenPtr m_CompositionGen;
/** Generates and applies an image of a single tree.
Parts of the tree inside the chunk are applied to a_BlockX.
@@ -78,10 +78,20 @@ class cStructGenOreNests :
public:
struct OreInfo
{
- BLOCKTYPE BlockType; // The type of the nest.
- int MaxHeight; // The highest possible a nest can occur
- int NumNests; // How many nests per chunk
- int NestSize; // The amount of blocks a nest can have.
+ BLOCKTYPE BlockType; // The type of the nest.
+ NIBBLETYPE BlockMeta; // The block meta
+ int MaxHeight; // The highest possible a nest can occur
+ int NumNests; // How many nests per chunk
+ int NestSize; // The amount of blocks a nest can have.
+
+ OreInfo() :
+ BlockType(0),
+ BlockMeta(0),
+ MaxHeight(0),
+ NumNests(0),
+ NestSize(0)
+ {
+ }
};
typedef std::vector<OreInfo> OreList;
@@ -103,7 +113,7 @@ protected:
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
- void GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_OreType, int a_MaxHeight, int a_NumNests, int a_NestSize, cChunkDef::BlockTypes & a_BlockTypes, int a_Seq);
+ void GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_OreType, NIBBLETYPE a_BlockMeta, int a_MaxHeight, int a_NumNests, int a_NestSize, cChunkDef::BlockTypes & a_BlockTypes, cChunkDesc::BlockNibbleBytes & a_BlockMetas, int a_Seq);
} ;
@@ -114,7 +124,7 @@ class cStructGenLakes :
public cFinishGen
{
public:
- cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid, cTerrainHeightGen & a_HeiGen, int a_Probability) :
+ cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid, cTerrainHeightGenPtr a_HeiGen, int a_Probability) :
m_Noise(a_Seed),
m_Seed(a_Seed),
m_Fluid(a_Fluid),
@@ -124,11 +134,11 @@ public:
}
protected:
- cNoise m_Noise;
- int m_Seed;
- BLOCKTYPE m_Fluid;
- cTerrainHeightGen & m_HeiGen;
- int m_Probability; ///< Chance, 0 .. 100, of a chunk having the lake
+ cNoise m_Noise;
+ int m_Seed;
+ BLOCKTYPE m_Fluid;
+ cTerrainHeightGenPtr m_HeiGen;
+ int m_Probability; ///< Chance, 0 .. 100, of a chunk having the lake
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;