summaryrefslogtreecommitdiffstats
path: root/game/shared/world/voxel_storage.hh
blob: ac7f03d9a140fc6aa289d4d578c830b6a28732a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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