mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
update region file format 2 to 3 (WIP)
This commit is contained in:
parent
73a8343f61
commit
184e9c6648
16 changed files with 295 additions and 57 deletions
15
test/files/compatibility.cpp
Normal file
15
test/files/compatibility.cpp
Normal 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());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue