summaryrefslogtreecommitdiffstats
path: root/game/shared/voxel_storage.hh
blob: a31cf3e5c0cfd2af1233ced6b04296d0b89b0636 (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 */