diff options
| author | untodesu <kirill@untode.su> | 2025-09-11 13:10:52 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-11 13:10:52 +0500 |
| commit | 96bd73ae020ecca1f94698744c77498a89ad19f7 (patch) | |
| tree | dc0ee946138141e7a0327a7d3c566f4a37adff3f /game/shared/world/voxel_storage.cc | |
| parent | 6dc5194895b6bd61d19bf5c95021471784084325 (diff) | |
| download | voxelius-96bd73ae020ecca1f94698744c77498a89ad19f7.tar.bz2 voxelius-96bd73ae020ecca1f94698744c77498a89ad19f7.zip | |
Graft build scripts and buffer code from QFengine
Diffstat (limited to 'game/shared/world/voxel_storage.cc')
| -rw-r--r-- | game/shared/world/voxel_storage.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/game/shared/world/voxel_storage.cc b/game/shared/world/voxel_storage.cc index e28c34f..68e261c 100644 --- a/game/shared/world/voxel_storage.cc +++ b/game/shared/world/voxel_storage.cc @@ -20,10 +20,10 @@ void world::VoxelStorage::serialize(io::WriteBuffer& buffer) const mz_compress(zdata.data(), &bound, reinterpret_cast<unsigned char*>(net_storage.data()), sizeof(VoxelStorage)); - buffer.write_UI64(bound); + buffer.write<std::uint64_t>(bound); // Write all the compressed data into the buffer - for(std::size_t i = 0; i < bound; buffer.write_UI8(zdata[i++])) { + for(std::size_t i = 0; i < bound; buffer.write<std::uint8_t>(zdata[i++])) { // empty } } @@ -31,11 +31,11 @@ void world::VoxelStorage::serialize(io::WriteBuffer& buffer) const void world::VoxelStorage::deserialize(io::ReadBuffer& buffer) { auto size = static_cast<mz_ulong>(sizeof(VoxelStorage)); - auto bound = static_cast<mz_ulong>(buffer.read_UI64()); + auto bound = static_cast<mz_ulong>(buffer.read<std::uint64_t>()); auto zdata = std::vector<unsigned char>(bound); // Read all the compressed data from the buffer - for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read_UI8()) { + for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read<std::uint8_t>()) { // empty } |
