diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:53:32 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:53:32 +0700 |
| commit | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (patch) | |
| tree | d9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/CustomLevelSource.cpp | |
| parent | d6ec138710461294c3ffd2723bc8a9f212d3471f (diff) | |
Get rid of MSVC's __int64
Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
Diffstat (limited to 'Minecraft.World/CustomLevelSource.cpp')
| -rw-r--r-- | Minecraft.World/CustomLevelSource.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/CustomLevelSource.cpp b/Minecraft.World/CustomLevelSource.cpp index 216e63b9..0d8ad81c 100644 --- a/Minecraft.World/CustomLevelSource.cpp +++ b/Minecraft.World/CustomLevelSource.cpp @@ -12,7 +12,7 @@ const double CustomLevelSource::SNOW_SCALE = 0.3; const double CustomLevelSource::SNOW_CUTOFF = 0.5; -CustomLevelSource::CustomLevelSource(Level *level, __int64 seed, bool generateStructures) : generateStructures( generateStructures ) +CustomLevelSource::CustomLevelSource(Level *level, int64_t seed, bool generateStructures) : generateStructures( generateStructures ) { #ifdef _OVERRIDE_HEIGHTMAP m_XZSize = level->getLevelData()->getXZSize(); @@ -326,7 +326,7 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi run = runDepth; if (y >= waterHeight - 1) blocks[offs] = top; else blocks[offs] = material; - } + } else if (run > 0) { run--; @@ -399,7 +399,7 @@ LevelChunk *CustomLevelSource::getChunk(int xOffs, int zOffs) // addCaves(xOffs, zOffs, blocks); // addTowns(xOffs, zOffs, blocks); - // levelChunk->recalcHeightmap(); // 4J - removed & moved into its own method + // levelChunk->recalcHeightmap(); // 4J - removed & moved into its own method // 4J - this now creates compressed block data from the blocks array passed in, so moved it until after the blocks are actually finalised. We also // now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. @@ -504,8 +504,8 @@ void CustomLevelSource::postProcess(ChunkSource *parent, int xt, int zt) } pprandom->setSeed(level->getSeed()); - __int64 xScale = pprandom->nextLong() / 2 * 2 + 1; - __int64 zScale = pprandom->nextLong() / 2 * 2 + 1; + int64_t xScale = pprandom->nextLong() / 2 * 2 + 1; + int64_t zScale = pprandom->nextLong() / 2 * 2 + 1; pprandom->setSeed(((xt * xScale) + (zt * zScale)) ^ level->getSeed()); bool hasVillage = false; |
