summaryrefslogtreecommitdiffstats
path: root/src/Generating/TwoHeights.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-08 15:40:12 +0200
committerMattes D <github@xoft.cz>2019-09-08 20:21:49 +0200
commit5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755 (patch)
tree7b633e2b29ae816dcc6a56c4d1c083518db7da04 /src/Generating/TwoHeights.cpp
parentBiomeGen: Changed to use cChunkCoords params. (diff)
downloadcuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar.gz
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar.bz2
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar.lz
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar.xz
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.tar.zst
cuberite-5f4df3e87dc43bb9cbf19ea1e15d73ee0b5d1755.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/TwoHeights.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Generating/TwoHeights.cpp b/src/Generating/TwoHeights.cpp
index 06c474458..dd05fe835 100644
--- a/src/Generating/TwoHeights.cpp
+++ b/src/Generating/TwoHeights.cpp
@@ -29,23 +29,23 @@ public:
// cTerrainShapeGen override:
- virtual void GenShape(int a_ChunkX, int a_ChunkZ, cChunkDesc::Shape & a_Shape) override
+ virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape & a_Shape) override
{
// Generate the two heightmaps:
cChunkDef::HeightMap heightsA;
cChunkDef::HeightMap heightsB;
- m_HeightA.GenHeightMap(a_ChunkX, a_ChunkZ, heightsA);
- m_HeightB.GenHeightMap(a_ChunkX, a_ChunkZ, heightsB);
+ m_HeightA.GenHeightMap(a_ChunkCoords, heightsA);
+ m_HeightB.GenHeightMap(a_ChunkCoords, heightsB);
// Generate the choice noise:
NOISE_DATATYPE smallChoice[33 * 5 * 5];
NOISE_DATATYPE workspace[33 * 5 * 5];
NOISE_DATATYPE startX = 0;
NOISE_DATATYPE endX = 256 * m_FrequencyY;
- NOISE_DATATYPE startY = a_ChunkX * cChunkDef::Width * m_FrequencyX;
- NOISE_DATATYPE endY = (a_ChunkX * cChunkDef::Width + cChunkDef::Width + 1) * m_FrequencyX;
- NOISE_DATATYPE startZ = a_ChunkZ * cChunkDef::Width * m_FrequencyZ;
- NOISE_DATATYPE endZ = (a_ChunkZ * cChunkDef::Width + cChunkDef::Width + 1) * m_FrequencyZ;
+ NOISE_DATATYPE startY = a_ChunkCoords.m_ChunkX * cChunkDef::Width * m_FrequencyX;
+ NOISE_DATATYPE endY = (a_ChunkCoords.m_ChunkX * cChunkDef::Width + cChunkDef::Width + 1) * m_FrequencyX;
+ NOISE_DATATYPE startZ = a_ChunkCoords.m_ChunkZ * cChunkDef::Width * m_FrequencyZ;
+ NOISE_DATATYPE endZ = (a_ChunkCoords.m_ChunkZ * cChunkDef::Width + cChunkDef::Width + 1) * m_FrequencyZ;
m_Choice.Generate3D(smallChoice, 33, 5, 5, startX, endX, startY, endY, startZ, endZ, workspace);
NOISE_DATATYPE choice[257 * 17 * 17];
LinearUpscale3DArray(smallChoice, 33, 5, 5, choice, 8, 4, 4);