add VoxelStructure lua usertype

This commit is contained in:
MihailRis
2024-09-19 18:41:34 +03:00
parent bf9f81a98c
commit 88b0f8e3d6
17 changed files with 180 additions and 60 deletions
+6 -2
View File
@@ -312,13 +312,17 @@ std::string util::base64_encode(const ubyte* data, size_t size) {
return ss.str();
}
std::string util::mangleid(uint64_t value) {
// todo: use base64
std::string util::tohex(uint64_t value) {
std::stringstream ss;
ss << std::hex << value;
return ss.str();
}
std::string util::mangleid(uint64_t value) {
// todo: use base64
return tohex(value);
}
util::Buffer<ubyte> util::base64_decode(const char* str, size_t size) {
util::Buffer<ubyte> bytes((size / 4) * 3);
ubyte* dst = bytes.data();