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
This commit is contained in:
@@ -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 seed, bool generateStructures) : generateStructures( generateStructures )
|
||||
RandomLevelSource::RandomLevelSource(Level *level, int64_t 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 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;
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user