diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
| commit | b9a2951901dac21b08589c9d8b4a7eae78757726 (patch) | |
| tree | 6b750cbdde9d2bd2aeaec9880ac7db62e9356745 /Minecraft.World/SparseLightStorage.h | |
| parent | 119bff351450ea16ffda550b6e0f67379b29f708 (diff) | |
Revert "Get rid of MSVC's __int64"
This reverts commit d63f79325f85e014361eb8cf1e41eaebedb1ae71.
Diffstat (limited to 'Minecraft.World/SparseLightStorage.h')
| -rw-r--r-- | Minecraft.World/SparseLightStorage.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/SparseLightStorage.h b/Minecraft.World/SparseLightStorage.h index c4cfbd04..d05d7645 100644 --- a/Minecraft.World/SparseLightStorage.h +++ b/Minecraft.World/SparseLightStorage.h @@ -20,9 +20,9 @@ // To meet these requirements, this class is now implemented using a lock-free system, implemented using a read-copy-update (RCU) type algorithm. Some details... -// (1) The storage details for the class are now packed into a single int64_t, which contains both a pointer to the data that is required and a count of how many planes worth +// (1) The storage details for the class are now packed into a single __int64, which contains both a pointer to the data that is required and a count of how many planes worth // of storage are allocated. This allows the full storage to be updated atomically using compare and exchange operations (implemented with InterlockedCompareExchangeRelease64). -// (2) The data pointer referenced in this int64_t points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and +// (2) The data pointer referenced in this __int64 points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and // the rest of the data is variable in size to accomodate however many planes are required to be stored // (3) The RCU bit of the algorithm means that any read operations don't need to do any checks or locks at all. When the data needs to be updated, a copy of it is made and updated, // then an attempt is made to swap the new data in - if this succeeds then the old data pointer is deleted later at some point where we know nothing will be reading from it anymore. @@ -38,7 +38,7 @@ class SparseLightStorage friend class TileCompressData_SPU; private: // unsigned char planeIndices[128]; - int64_t dataAndCount; // Contains packed-together data pointer (lower 48-bits), and count of lines used (upper 16-bits) + __int64 dataAndCount; // Contains packed-together data pointer (lower 48-bits), and count of lines used (upper 16-bits) // unsigned char *data; // unsigned int allocatedPlaneCount; @@ -66,7 +66,7 @@ public: void addNewPlane(int y); void getPlaneIndicesAndData(unsigned char **planeIndices, unsigned char **data); - void updateDataAndCount(int64_t newDataAndCount); + void updateDataAndCount(__int64 newDataAndCount); int compress(); bool isCompressed(); |
