aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ChunkPos.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:39:35 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:39:35 +0700
commitb9a2951901dac21b08589c9d8b4a7eae78757726 (patch)
tree6b750cbdde9d2bd2aeaec9880ac7db62e9356745 /Minecraft.World/ChunkPos.cpp
parent119bff351450ea16ffda550b6e0f67379b29f708 (diff)
Revert "Get rid of MSVC's __int64"
This reverts commit d63f79325f85e014361eb8cf1e41eaebedb1ae71.
Diffstat (limited to 'Minecraft.World/ChunkPos.cpp')
-rw-r--r--Minecraft.World/ChunkPos.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/ChunkPos.cpp b/Minecraft.World/ChunkPos.cpp
index 1bdf165d..3f9674a7 100644
--- a/Minecraft.World/ChunkPos.cpp
+++ b/Minecraft.World/ChunkPos.cpp
@@ -6,16 +6,16 @@ ChunkPos::ChunkPos(int x, int z) : x( x ), z( z )
{
}
-int64_t ChunkPos::hashCode(int x, int z)
+__int64 ChunkPos::hashCode(int x, int z)
{
- int64_t xx = x;
- int64_t zz = z;
+ __int64 xx = x;
+ __int64 zz = z;
return (xx & 0xffffffffl) | ((zz & 0xffffffffl) << 32l);
}
int ChunkPos::hashCode()
{
- int64_t hash = hashCode(x, z);
+ __int64 hash = hashCode(x, z);
int h1 = (int) (hash);
int h2 = (int) (hash >> 32l);
return h1 ^ h2;
@@ -53,7 +53,7 @@ int ChunkPos::getMiddleBlockZ()
return ( z << 4 ) + 8;
}
-TilePos ChunkPos::getMiddleBlockPosition(int y)
+TilePos ChunkPos::getMiddleBlockPosition(int y)
{
return TilePos(getMiddleBlockX(), y, getMiddleBlockZ());
}
@@ -63,7 +63,7 @@ wstring ChunkPos::toString()
return L"[" + _toString<int>(x) + L", " + _toString<int>(z) + L"]";
}
-int64_t ChunkPos::hash_fnct(const ChunkPos &k)
+__int64 ChunkPos::hash_fnct(const ChunkPos &k)
{
return k.hashCode(k.x,k.z);
}