summaryrefslogtreecommitdiffstats
path: root/src/game/shared/world/voxel_storage.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/shared/world/voxel_storage.hh')
-rw-r--r--src/game/shared/world/voxel_storage.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/shared/world/voxel_storage.hh b/src/game/shared/world/voxel_storage.hh
new file mode 100644
index 0000000..ac7f03d
--- /dev/null
+++ b/src/game/shared/world/voxel_storage.hh
@@ -0,0 +1,20 @@
+#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