]> git.localhorst.tv Git - blank.git/blob - src/client/ChunkTransmission.hpp
fix comment handling in TokenStreamReader
[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 Reset() noexcept;
32         void Clear() noexcept;
33
34         bool Complete() const noexcept;
35
36         bool Compressed() const noexcept;
37
38 };
39
40 }
41 }
42
43 #endif