diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/FixedBiomeSource.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/FixedBiomeSource.cpp')
| -rw-r--r-- | Minecraft.World/FixedBiomeSource.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.World/FixedBiomeSource.cpp b/Minecraft.World/FixedBiomeSource.cpp index 2657bdb4..257ec3db 100644 --- a/Minecraft.World/FixedBiomeSource.cpp +++ b/Minecraft.World/FixedBiomeSource.cpp @@ -26,9 +26,9 @@ float FixedBiomeSource::getTemperature(int x, int z) void FixedBiomeSource::getTemperatureBlock(floatArray& temperatures, int x, int z, int w, int h) const { - if (temperatures.data == nullptr || temperatures.length < w * h) + if (temperatures.data == NULL || temperatures.length < w * h) { - if(temperatures.data != nullptr) delete [] temperatures.data; + if(temperatures.data != NULL) delete [] temperatures.data; temperatures = floatArray(w * h); } @@ -52,9 +52,9 @@ void FixedBiomeSource::getTemperatureBlock(doubleArray& temperatures, int x, int void FixedBiomeSource::getDownfallBlock(floatArray &downfalls, int x, int z, int w, int h) const { - if (downfalls.data == nullptr || downfalls.length < w * h) + if (downfalls.data == NULL || downfalls.length < w * h) { - if(downfalls.data != nullptr) delete [] downfalls.data; + if(downfalls.data != NULL) delete [] downfalls.data; downfalls = floatArray(w * h); } Arrays::fill(downfalls, 0, w * h, downfall); @@ -74,9 +74,9 @@ float FixedBiomeSource::getDownfall(int x, int z) const void FixedBiomeSource::getDownfallBlock(doubleArray downfalls, int x, int z, int w, int h) { - if (downfalls.data == nullptr || downfalls.length < w * h) + if (downfalls.data == NULL || downfalls.length < w * h) { - if(downfalls.data != nullptr) delete [] downfalls.data; + if(downfalls.data != NULL) delete [] downfalls.data; downfalls = doubleArray(w * h); } Arrays::fill(downfalls, 0, w * h, (double) downfall); @@ -129,7 +129,7 @@ TilePos *FixedBiomeSource::findBiome(int x, int z, int r, Biome *toFind, Random return new TilePos(x - r + random->nextInt(r * 2 + 1), 0, z - r + random->nextInt(r * 2 + 1)); } - return nullptr; + return NULL; } TilePos *FixedBiomeSource::findBiome(int x, int z, int r, vector<Biome *> allowed, Random *random) @@ -139,7 +139,7 @@ TilePos *FixedBiomeSource::findBiome(int x, int z, int r, vector<Biome *> allowe return new TilePos(x - r + random->nextInt(r * 2 + 1), 0, z - r + random->nextInt(r * 2 + 1)); } - return nullptr; + return NULL; } bool FixedBiomeSource::containsOnly(int x, int z, int r, Biome *allowed) |
