summaryrefslogtreecommitdiffstats
path: root/src/Generating/StructGen.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-08 17:39:43 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-03-18 00:44:42 +0100
commit5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c (patch)
treeea5f79ad71456dcbf4f658a61cc259ac4e6e7d79 /src/Generating/StructGen.h
parentAdd heraldry names to banner pattern API docs (diff)
downloadcuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.gz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.bz2
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.lz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.xz
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.zst
cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.zip
Diffstat (limited to 'src/Generating/StructGen.h')
-rw-r--r--src/Generating/StructGen.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/Generating/StructGen.h b/src/Generating/StructGen.h
index ae7626873..ec3ed89f6 100644
--- a/src/Generating/StructGen.h
+++ b/src/Generating/StructGen.h
@@ -22,21 +22,21 @@ class cStructGenTrees :
public cFinishGen
{
public:
- cStructGenTrees(int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainShapeGenPtr a_ShapeGen, cTerrainCompositionGenPtr a_CompositionGen) :
+ cStructGenTrees(int a_Seed, cBiomeGen & a_BiomeGen, cTerrainShapeGen & a_ShapeGen, cTerrainCompositionGen & a_CompositionGen) :
m_Seed(a_Seed),
m_Noise(a_Seed),
- m_BiomeGen(std::move(a_BiomeGen)),
- m_ShapeGen(std::move(a_ShapeGen)),
- m_CompositionGen(std::move(a_CompositionGen))
+ m_BiomeGen(a_BiomeGen),
+ m_ShapeGen(a_ShapeGen),
+ m_CompositionGen(a_CompositionGen)
{}
protected:
int m_Seed;
cNoise m_Noise;
- cBiomeGenPtr m_BiomeGen;
- cTerrainShapeGenPtr m_ShapeGen;
- cTerrainCompositionGenPtr m_CompositionGen;
+ cBiomeGen & m_BiomeGen;
+ cTerrainShapeGen & m_ShapeGen;
+ cTerrainCompositionGen & m_CompositionGen;
/** Generates and applies an image of a single tree.
Parts of the tree inside the chunk are applied to a_ChunkDesc.
@@ -78,20 +78,20 @@ class cStructGenLakes :
public cFinishGen
{
public:
- cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid, cTerrainShapeGenPtr a_ShapeGen, int a_Probability) :
+ cStructGenLakes(int a_Seed, BLOCKTYPE a_Fluid, cTerrainShapeGen & a_ShapeGen, int a_Probability) :
m_Noise(a_Seed),
m_Seed(a_Seed),
m_Fluid(a_Fluid),
- m_ShapeGen(std::move(a_ShapeGen)),
+ m_ShapeGen(a_ShapeGen),
m_Probability(a_Probability)
{
}
protected:
- cNoise m_Noise;
- int m_Seed;
- BLOCKTYPE m_Fluid;
- cTerrainShapeGenPtr m_ShapeGen;
+ cNoise m_Noise;
+ int m_Seed;
+ BLOCKTYPE m_Fluid;
+ cTerrainShapeGen & m_ShapeGen;
/** Chance, [0 .. 100], of a chunk having the lake. */
int m_Probability;
@@ -143,7 +143,3 @@ protected:
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
} ;
-
-
-
-