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