diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
| commit | b9a2951901dac21b08589c9d8b4a7eae78757726 (patch) | |
| tree | 6b750cbdde9d2bd2aeaec9880ac7db62e9356745 /Minecraft.World/RandomLevelSource.cpp | |
| parent | 119bff351450ea16ffda550b6e0f67379b29f708 (diff) | |
Revert "Get rid of MSVC's __int64"
This reverts commit d63f79325f85e014361eb8cf1e41eaebedb1ae71.
Diffstat (limited to 'Minecraft.World/RandomLevelSource.cpp')
| -rw-r--r-- | Minecraft.World/RandomLevelSource.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.World/RandomLevelSource.cpp b/Minecraft.World/RandomLevelSource.cpp index 277ff1f7..4e26134a 100644 --- a/Minecraft.World/RandomLevelSource.cpp +++ b/Minecraft.World/RandomLevelSource.cpp @@ -23,7 +23,7 @@ static PerlinNoise_DataIn g_depthNoise_SPU __attribute__((__aligned__(16))); const double RandomLevelSource::SNOW_SCALE = 0.3; const double RandomLevelSource::SNOW_CUTOFF = 0.5; -RandomLevelSource::RandomLevelSource(Level *level, int64_t seed, bool generateStructures) : generateStructures( generateStructures ) +RandomLevelSource::RandomLevelSource(Level *level, __int64 seed, bool generateStructures) : generateStructures( generateStructures ) { m_XZSize = level->getLevelData()->getXZSize(); @@ -160,7 +160,7 @@ void RandomLevelSource::prepareHeights(int xOffs, int zOffs, byteArray blocks) const int worldSize = m_XZSize * 16; const int falloffStart = 32; // chunks away from edge were we start doing fall-off const float falloffMax = 128.0f; // max value we need to get to falloff by the edge of the map - + int xxx = ( ( xOffs * 16 ) + x + ( xc * CHUNK_WIDTH ) ); int zzz = ( ( zOffs * 16 ) + z + ( zc * CHUNK_WIDTH ) ); @@ -320,7 +320,7 @@ void RandomLevelSource::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--; @@ -389,7 +389,7 @@ LevelChunk *RandomLevelSource::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,7 +504,7 @@ doubleArray RandomLevelSource::getHeights(doubleArray buffer, int x, int y, int sss = sss * 0.9f + 0.1f; ddd = (ddd * 4 - 1) / 8.0f; - + double rdepth = (dr[pp] / 8000.0); if (rdepth < 0) rdepth = -rdepth * 0.3; rdepth = rdepth * 3.0 - 2.0; @@ -515,7 +515,7 @@ doubleArray RandomLevelSource::getHeights(doubleArray buffer, int x, int y, int if (rdepth < -1) rdepth = -1; rdepth = rdepth / 1.4; rdepth /= 2; - } + } else { if (rdepth > 1) rdepth = 1; @@ -652,8 +652,8 @@ void RandomLevelSource::postProcess(ChunkSource *parent, int xt, int zt) } pprandom->setSeed(level->getSeed()); - int64_t xScale = pprandom->nextLong() / 2 * 2 + 1; - int64_t zScale = pprandom->nextLong() / 2 * 2 + 1; + __int64 xScale = pprandom->nextLong() / 2 * 2 + 1; + __int64 zScale = pprandom->nextLong() / 2 * 2 + 1; pprandom->setSeed(((xt * xScale) + (zt * zScale)) ^ level->getSeed()); bool hasVillage = false; @@ -712,7 +712,7 @@ void RandomLevelSource::postProcess(ChunkSource *parent, int xt, int zt) PIXBeginNamedEvent(0,"Biome decorate"); biome->decorate(level, pprandom, xo, zo); PIXEndNamedEvent(); - + app.processSchematics(parent->getChunk(xt,zt)); MobSpawner::postProcessSpawnMobs(level, biome, xo + 8, zo + 8, 16, 16, pprandom); |
