diff options
Diffstat (limited to 'game/shared/world/voxel_storage.hh')
| -rw-r--r-- | game/shared/world/voxel_storage.hh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/game/shared/world/voxel_storage.hh b/game/shared/world/voxel_storage.hh new file mode 100644 index 0000000..fdb6e33 --- /dev/null +++ b/game/shared/world/voxel_storage.hh @@ -0,0 +1,24 @@ +#ifndef SHARED_VOXEL_STORAGE_HH +#define SHARED_VOXEL_STORAGE_HH 1 +#pragma once + +#include "shared/const.hh" +#include "shared/types.hh" + +namespace io +{ +class ReadBuffer; +class WriteBuffer; +} // namespace io + +namespace world +{ +class VoxelStorage final : public std::array<voxel_id, CHUNK_VOLUME> { +public: + using std::array<voxel_id, CHUNK_VOLUME>::array; + void serialize(io::WriteBuffer& buffer) const; + void deserialize(io::ReadBuffer& buffer); +}; +} // namespace world + +#endif // SHARED_VOXEL_STORAGE_HH |
