From d63f79325f85e014361eb8cf1e41eaebedb1ae71 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:53:32 +0700 Subject: 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 --- Minecraft.World/Level.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Minecraft.World/Level.h') diff --git a/Minecraft.World/Level.h b/Minecraft.World/Level.h index 361a40e8..ecafc02b 100644 --- a/Minecraft.World/Level.h +++ b/Minecraft.World/Level.h @@ -133,7 +133,7 @@ public: Random *random; bool isNew; Dimension *dimension; - + protected: vector listeners; @@ -239,26 +239,26 @@ public: void setBrightnessNoUpdateOnClient(LightLayer::variety layer, int x, int y, int z, int brightness); // 4J added #ifdef _LARGE_WORLDS - typedef __uint64 lightCache_t; + typedef uint64_t lightCache_t; #else typedef unsigned int lightCache_t; #endif - inline void setBrightnessCached(lightCache_t *cache, __uint64 *cacheUse, LightLayer::variety layer, int x, int y, int z, int brightness); + inline void setBrightnessCached(lightCache_t *cache, uint64_t *cacheUse, LightLayer::variety layer, int x, int y, int z, int brightness); inline int getBrightnessCached(lightCache_t *cache, LightLayer::variety layer, int x, int y, int z); inline int getEmissionCached(lightCache_t *cache, int ct, int x, int y, int z); inline int getBlockingCached(lightCache_t *cache, LightLayer::variety layer, int *ct, int x, int y, int z); void initCache(lightCache_t *cache); - void flushCache(lightCache_t *cache, __uint64 cacheUse, LightLayer::variety layer); + void flushCache(lightCache_t *cache, uint64_t cacheUse, LightLayer::variety layer); bool cachewritten; static const int LIGHTING_SHIFT = 24; static const int BLOCKING_SHIFT = 20; static const int EMISSION_SHIFT = 16; #ifdef _LARGE_WORLDS - static const __int64 LIGHTING_WRITEBACK = 0x80000000LL; - static const __int64 EMISSION_VALID = 0x40000000LL; - static const __int64 BLOCKING_VALID = 0x20000000LL; - static const __int64 LIGHTING_VALID = 0x10000000LL; + static const int64_t LIGHTING_WRITEBACK = 0x80000000LL; + static const int64_t EMISSION_VALID = 0x40000000LL; + static const int64_t BLOCKING_VALID = 0x20000000LL; + static const int64_t LIGHTING_VALID = 0x10000000LL; static const lightCache_t POSITION_MASK = 0xffffffff0000ffffLL; #else static const int LIGHTING_WRITEBACK = 0x80000000; @@ -402,7 +402,7 @@ public: bool shouldSnow(int x, int y, int z); void checkLight(int x, int y, int z, bool force = false, bool rootOnlyEmissive = false); // 4J added force, rootOnlySource parameters private: - int *toCheckLevel; + int *toCheckLevel; int getExpectedSkyColor(lightCache_t *cache, int oc, int x, int y , int z, int ct, int block); int getExpectedBlockColor(lightCache_t *cache, int oc, int x, int y, int z, int ct, int block, bool propagatedOnly); // 4J added parameter public: @@ -449,10 +449,10 @@ public: void setBlocksAndData(int x, int y, int z, int xs, int ys, int zs, byteArray data, bool includeLighting = true); virtual void disconnect(bool sendDisconnect = true); void checkSession(); - void setTime(__int64 time); - void setOverrideTimeOfDay(__int64 time); // 4J Added so we can override timeOfDay without changing tick time - __int64 getSeed(); - __int64 getTime(); + void setTime(int64_t time); + void setOverrideTimeOfDay(int64_t time); // 4J Added so we can override timeOfDay without changing tick time + int64_t getSeed(); + int64_t getTime(); Pos *getSharedSpawnPos(); void setSpawnPos(int x, int y, int z); void setSpawnPos(Pos *spawnPos); @@ -496,7 +496,7 @@ public: // 4J added - __int64 m_timeOfDayOverride; + int64_t m_timeOfDayOverride; // 4J - optimisation - keep direct reference of underlying cache here LevelChunk **chunkSourceCache; -- cgit v1.2.3