X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FChunkTransmission.hpp;fp=src%2Fclient%2FChunkTransmission.hpp;h=f54c7d8a2182d3daec20795c67794ebd34c42d99;hb=8ae45b6555d55f301f83daf8c1337d332d8305ab;hp=0000000000000000000000000000000000000000;hpb=7fd76e64de47f564117b9e6f73f1482d93842108;p=blank.git diff --git a/src/client/ChunkTransmission.hpp b/src/client/ChunkTransmission.hpp new file mode 100644 index 0000000..f54c7d8 --- /dev/null +++ b/src/client/ChunkTransmission.hpp @@ -0,0 +1,42 @@ +#ifndef BLANK_CLIENT_CHUNKTRANSMISSION_HPP_ +#define BLANK_CLIENT_CHUNKTRANSMISSION_HPP_ + +#include "../world/Chunk.hpp" + +#include +#include + + +namespace blank { +namespace client { + +struct ChunkTransmission { + + std::uint32_t id; + std::uint32_t flags; + glm::ivec3 coords; + std::uint32_t data_size; + std::uint32_t data_received; + + int last_update; + + bool header_received; + bool active; + + std::uint8_t buffer[Chunk::BlockSize() + 10]; + + + ChunkTransmission(); + + void Clear() noexcept; + + bool Complete() const noexcept; + + bool Compressed() const noexcept; + +}; + +} +} + +#endif