diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-08 17:39:43 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-18 00:44:42 +0100 |
commit | 5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c (patch) | |
tree | ea5f79ad71456dcbf4f658a61cc259ac4e6e7d79 /src/Generating/CompositedHeiGen.h | |
parent | Add heraldry names to banner pattern API docs (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Generating/CompositedHeiGen.h | 24 |
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; }; - - - - |