summaryrefslogtreecommitdiffstats
path: root/game/shared/voxel_storage.hh
blob: 08d234d107f15c0973243d40a517d33f42f5248a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef SHARED_VOXEL_STORAGE_HH
#define SHARED_VOXEL_STORAGE_HH 1
#pragma once

#include "shared/const.hh"
#include "shared/types.hh"

class ReadBuffer;
class WriteBuffer;

class VoxelStorage final : public std::array<voxel_id, CHUNK_VOLUME> {
public:
    using std::array<voxel_id, CHUNK_VOLUME>::array;
    void serialize(WriteBuffer &buffer) const;
    void deserialize(ReadBuffer &buffer);
};

#endif /* SHARED_VOXEL_STORAGE_HH */