aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Level.cpp
diff options
context:
space:
mode:
authorvoid_17 <61356189+void2012@users.noreply.github.com>2026-03-07 03:31:30 +0700
committerGitHub <noreply@github.com>2026-03-07 03:31:30 +0700
commit988e3042e00485aa7ed3725fe7bfde1da8cf8519 (patch)
treecf712d80b4d03eec73f935e0cce23020ddb6f5ef /Minecraft.World/Level.cpp
parent175fc3824e502ecd701c1da2ecd2061d77495693 (diff)
Remove all MSVC `__int64` (#742)
Diffstat (limited to 'Minecraft.World/Level.cpp')
-rw-r--r--Minecraft.World/Level.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/Minecraft.World/Level.cpp b/Minecraft.World/Level.cpp
index b977ad7d..ef79fb39 100644
--- a/Minecraft.World/Level.cpp
+++ b/Minecraft.World/Level.cpp
@@ -178,7 +178,7 @@ void Level::initCacheComplete(lightCache_t *cache, int xc, int yc, int zc)
}
// Set a brightness value, going through the cache if enabled for this thread
-void inline Level::setBrightnessCached(lightCache_t *cache, __uint64 *cacheUse, LightLayer::variety layer, int x, int y, int z, int brightness)
+void inline Level::setBrightnessCached(lightCache_t *cache, uint64_t *cacheUse, LightLayer::variety layer, int x, int y, int z, int brightness)
{
if( cache == NULL )
{
@@ -195,8 +195,8 @@ void inline Level::setBrightnessCached(lightCache_t *cache, __uint64 *cacheUse,
( ( z & 0x3f0 ) >> 4 );
#ifdef _LARGE_WORLDS
// Add in the higher bits for x and z
- posbits |= ( ( ((__uint64)x) & 0x3FFFC00L) << 38) |
- ( ( ((__uint64)z) & 0x3FFFC00L) << 22);
+ posbits |= ( ( ((uint64_t)x) & 0x3FFFC00L) << 38) |
+ ( ( ((uint64_t)z) & 0x3FFFC00L) << 22);
#endif
lightCache_t cacheValue = cache[idx];
@@ -254,8 +254,8 @@ inline int Level::getBrightnessCached(lightCache_t *cache, LightLayer::variety l
( ( z & 0x3f0 ) >> 4 );
#ifdef _LARGE_WORLDS
// Add in the higher bits for x and z
- posbits |= ( ( ((__uint64)x) & 0x3FFFC00L) << 38) |
- ( ( ((__uint64)z) & 0x3FFFC00L) << 22);
+ posbits |= ( ( ((uint64_t)x) & 0x3FFFC00L) << 38) |
+ ( ( ((uint64_t)z) & 0x3FFFC00L) << 22);
#endif
lightCache_t cacheValue = cache[idx];
@@ -321,8 +321,8 @@ inline int Level::getEmissionCached(lightCache_t *cache, int ct, int x, int y, i
( ( z & 0x3f0 ) >> 4 );
#ifdef _LARGE_WORLDS
// Add in the higher bits for x and z
- posbits |= ( ( ((__uint64)x) & 0x3FFFC00) << 38) |
- ( ( ((__uint64)z) & 0x3FFFC00) << 22);
+ posbits |= ( ( ((uint64_t)x) & 0x3FFFC00) << 38) |
+ ( ( ((uint64_t)z) & 0x3FFFC00) << 22);
#endif
lightCache_t cacheValue = cache[idx];
@@ -397,8 +397,8 @@ inline int Level::getBlockingCached(lightCache_t *cache, LightLayer::variety lay
( ( z & 0x3f0 ) >> 4 );
#ifdef _LARGE_WORLDS
// Add in the higher bits for x and z
- posbits |= ( ( ((__uint64)x) & 0x3FFFC00L) << 38) |
- ( ( ((__uint64)z) & 0x3FFFC00L) << 22);
+ posbits |= ( ( ((uint64_t)x) & 0x3FFFC00L) << 38) |
+ ( ( ((uint64_t)z) & 0x3FFFC00L) << 22);
#endif
lightCache_t cacheValue = cache[idx];
@@ -460,7 +460,7 @@ inline int Level::getBlockingCached(lightCache_t *cache, LightLayer::variety lay
// this hasn't been updated (for client threads) for each individual lighting update as would have been the case with the non-cached lighting. There's two reasons for this
// (1) it's more efficient, since we aren't doing so many individual calls to the level listener to let the renderer know what has been updated
// (2) it lets the lighting actually complete before we get any visual representation of the update, otherwise we end up seeing some strange partial updates
-void Level::flushCache(lightCache_t *cache, __uint64 cacheUse, LightLayer::variety layer)
+void Level::flushCache(lightCache_t *cache, uint64_t cacheUse, LightLayer::variety layer)
{
// cacheUse has a single bit for each x, y and z to say whether anything with that x, y or z has been written to
if( cacheUse == 0 ) return;
@@ -3438,7 +3438,7 @@ int Level::getExpectedLight(lightCache_t *cache, int x, int y, int z, LightLayer
void Level::checkLight(LightLayer::variety layer, int xc, int yc, int zc, bool force, bool rootOnlyEmissive)
{
lightCache_t *cache = (lightCache_t *)TlsGetValue(tlsIdxLightCache);
- __uint64 cacheUse = 0;
+ uint64_t cacheUse = 0;
if( force )
{
@@ -4281,13 +4281,13 @@ void Level::checkSession()
}
-void Level::setGameTime(__int64 time)
+void Level::setGameTime(int64_t time)
{
// 4J : WESTY : Added to track game time played by players for other awards.
if (time != 0) // Ignore setting time to 0, done at level start and during tutorial.
{
// Determine step in time and ensure it is reasonable ( we only have an int to store the player stat).
- __int64 timeDiff = time - levelData->getGameTime();
+ int64_t timeDiff = time - levelData->getGameTime();
if (timeDiff < 0)
{
@@ -4313,22 +4313,22 @@ void Level::setGameTime(__int64 time)
levelData->setGameTime(time);
}
-__int64 Level::getSeed()
+int64_t Level::getSeed()
{
return levelData->getSeed();
}
-__int64 Level::getGameTime()
+int64_t Level::getGameTime()
{
return levelData->getGameTime();
}
-__int64 Level::getDayTime()
+int64_t Level::getDayTime()
{
return levelData->getDayTime();
}
-void Level::setDayTime(__int64 newTime)
+void Level::setDayTime(int64_t newTime)
{
levelData->setDayTime(newTime);
}
@@ -4524,7 +4524,7 @@ Tickable *Level::makeSoundUpdater(shared_ptr<Minecart> minecart)
Random *Level::getRandomFor(int x, int z, int blend)
{
- __int64 seed = (x * 341873128712l + z * 132897987541l) + getLevelData()->getSeed() + blend;
+ int64_t seed = (x * 341873128712l + z * 132897987541l) + getLevelData()->getSeed() + blend;
random->setSeed(seed);
return random;
}