mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
feat: world.get_chunk_data(...) saved chunk data when chunk is not loaded
This commit is contained in:
parent
f1f81371af
commit
02a93d8bc3
3 changed files with 36 additions and 16 deletions
|
|
@ -1,13 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include "typedefs.hpp"
|
||||
#include "Chunk.hpp"
|
||||
#include "coders/byte_utils.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class Chunk;
|
||||
class WorldRegions;
|
||||
|
||||
namespace compressed_chunks {
|
||||
std::vector<ubyte> encode(
|
||||
const ubyte* voxelData,
|
||||
const BlocksMetadata& metadata,
|
||||
util::Buffer<ubyte>& rleBuffer
|
||||
);
|
||||
std::vector<ubyte> encode(const Chunk& chunk);
|
||||
void decode(Chunk& chunk, const ubyte* src, size_t size);
|
||||
void save(int x, int z, std::vector<ubyte> bytes, WorldRegions& regions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue