summaryrefslogtreecommitdiffstats
path: root/src/Generating/CompositedHeiGen.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/CompositedHeiGen.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/CompositedHeiGen.h')
-rw-r--r--src/Generating/CompositedHeiGen.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/Generating/CompositedHeiGen.h b/src/Generating/CompositedHeiGen.h
index 400008d88..6107d33ae 100644
--- a/src/Generating/CompositedHeiGen.h
+++ b/src/Generating/CompositedHeiGen.h
@@ -20,10 +20,10 @@ class cCompositedHeiGen:
public cTerrainHeightGen
{
public:
- cCompositedHeiGen(cBiomeGenPtr a_BiomeGen, cTerrainShapeGenPtr a_ShapeGen, cTerrainCompositionGenPtr a_CompositionGen):
- m_BiomeGen(std::move(a_BiomeGen)),
- m_ShapeGen(std::move(a_ShapeGen)),
- m_CompositionGen(std::move(a_CompositionGen))
+ cCompositedHeiGen(cBiomeGen & a_BiomeGen, cTerrainShapeGen & a_ShapeGen, cTerrainCompositionGen & a_CompositionGen):
+ m_BiomeGen(a_BiomeGen),
+ m_ShapeGen(a_ShapeGen),
+ m_CompositionGen(a_CompositionGen)
{
}
@@ -33,20 +33,16 @@ public:
virtual void GenHeightMap(cChunkCoords a_ChunkCoords, cChunkDef::HeightMap & a_HeightMap) override
{
cChunkDesc::Shape shape;
- m_ShapeGen->GenShape(a_ChunkCoords, shape);
+ m_ShapeGen.GenShape(a_ChunkCoords, shape);
cChunkDesc desc(a_ChunkCoords);
- m_BiomeGen->GenBiomes(a_ChunkCoords, desc.GetBiomeMap()); // Need to initialize biomes for the composition gen
+ m_BiomeGen.GenBiomes(a_ChunkCoords, desc.GetBiomeMap()); // Need to initialize biomes for the composition gen
desc.SetHeightFromShape(shape);
- m_CompositionGen->ComposeTerrain(desc, shape);
+ m_CompositionGen.ComposeTerrain(desc, shape);
memcpy(a_HeightMap, desc.GetHeightMap(), sizeof(a_HeightMap));
}
protected:
- cBiomeGenPtr m_BiomeGen;
- cTerrainShapeGenPtr m_ShapeGen;
- cTerrainCompositionGenPtr m_CompositionGen;
+ cBiomeGen & m_BiomeGen;
+ cTerrainShapeGen & m_ShapeGen;
+ cTerrainCompositionGen & m_CompositionGen;
};
-
-
-
-