]> git.localhorst.tv Git - blank.git/blob - src/client/ChunkTransmission.hpp
f54c7d8a2182d3daec20795c67794ebd34c42d99
[blank.git] / src / client / ChunkTransmission.hpp
1 #ifndef BLANK_CLIENT_CHUNKTRANSMISSION_HPP_
2 #define BLANK_CLIENT_CHUNKTRANSMISSION_HPP_
3
4 #include "../world/Chunk.hpp"
5
6 #include <cstdint>
7 #include <glm/glm.hpp>
8
9
10 namespace blank {
11 namespace client {
12
13 struct ChunkTransmission {
14
15         std::uint32_t id;
16         std::uint32_t flags;
17         glm::ivec3 coords;
18         std::uint32_t data_size;
19         std::uint32_t data_received;
20
21         int last_update;
22
23         bool header_received;
24         bool active;
25
26         std::uint8_t buffer[Chunk::BlockSize() + 10];
27
28
29         ChunkTransmission();
30
31         void Clear() noexcept;
32
33         bool Complete() const noexcept;
34
35         bool Compressed() const noexcept;
36
37 };
38
39 }
40 }
41
42 #endif