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:
void_17
2026-03-02 15:53:32 +07:00
parent d6ec138710
commit d63f79325f
308 changed files with 5371 additions and 5379 deletions

View File

@@ -133,7 +133,7 @@ public:
Random *random;
bool isNew;
Dimension *dimension;
protected:
vector<LevelListener *> 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;