diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-12 19:55:49 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-12 19:55:49 +0200 |
commit | 1927095d25614bcec73f93e74424110d3feefc7f (patch) | |
tree | f24bafbd79baf304f3ff7633f25be64b06cf5f21 /source/Generating/BioGen.cpp | |
parent | cWorld: Temporary fix for FS #338 (diff) | |
download | cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar.gz cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar.bz2 cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar.lz cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar.xz cuberite-1927095d25614bcec73f93e74424110d3feefc7f.tar.zst cuberite-1927095d25614bcec73f93e74424110d3feefc7f.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Generating/BioGen.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/Generating/BioGen.cpp b/source/Generating/BioGen.cpp index 1a73fe109..13e7c88ae 100644 --- a/source/Generating/BioGen.cpp +++ b/source/Generating/BioGen.cpp @@ -6,6 +6,7 @@ #include "Globals.h" #include "BioGen.h" #include "../../iniFile/iniFile.h" +#include "../LinearUpscale.h" @@ -339,8 +340,8 @@ void cBioGenDistortedVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::B Distort(BaseX + x * 4, BaseZ + z * 4, DistortX[4 * x][4 * z], DistortZ[4 * x][4 * z]); } - IntArrayLinearInterpolate2D(&DistortX[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); - IntArrayLinearInterpolate2D(&DistortZ[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); + ArrayLinearUpscale2D(&DistortX[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); + ArrayLinearUpscale2D(&DistortZ[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); for (int z = 0; z < cChunkDef::Width; z++) { @@ -446,8 +447,8 @@ void cBioGenMultiStepMap::DecideOceanLandMushroom(int a_ChunkX, int a_ChunkZ, cC { Distort(BaseX + x * 4, BaseZ + z * 4, DistortX[4 * x][4 * z], DistortZ[4 * x][4 * z], DistortSize); } - IntArrayLinearInterpolate2D(&DistortX[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); - IntArrayLinearInterpolate2D(&DistortZ[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); + ArrayLinearUpscale2D(&DistortX[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); + ArrayLinearUpscale2D(&DistortZ[0][0], cChunkDef::Width + 1, cChunkDef::Width + 1, 4, 4); // Prepare a 9x9 area of neighboring cell seeds // (assuming that 7x7 cell area is larger than a chunk being generated) @@ -620,8 +621,8 @@ void cBioGenMultiStepMap::BuildTemperatureHumidityMaps(int a_ChunkX, int a_Chunk HumidityMap[x + 17 * z] = NoiseH; } // for x } // for z - ArrayLinearInterpolate2D(TemperatureMap, 17, 17, 8, 8); - ArrayLinearInterpolate2D(HumidityMap, 17, 17, 8, 8); + ArrayLinearUpscale2D(TemperatureMap, 17, 17, 8, 8); + ArrayLinearUpscale2D(HumidityMap, 17, 17, 8, 8); // Re-map into integral values in [0 .. 255] range: for (int idx = 0; idx < ARRAYCOUNT(a_TemperatureMap); idx++) |