update region file format 2 to 3 (WIP)

This commit is contained in:
MihailRis
2024-09-04 23:37:39 +03:00
parent 73a8343f61
commit 184e9c6648
16 changed files with 295 additions and 57 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <gtest/gtest.h>
#include <filesystem>
#include "files/files.hpp"
#include "files/compatibility.hpp"
TEST(compatibility, convert) {
auto infile = std::filesystem::u8path(
"voxels_0_1.bin");
auto outfile = std::filesystem::u8path(
"output_0_1.bin");
auto input = files::read_bytes_buffer(infile);
auto output = compatibility::convertRegion2to3(input, REGION_LAYER_VOXELS);
files::write_bytes(outfile, output.data(), output.size());
}