X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fnet%2FChunkTransmission.hpp;fp=src%2Fnet%2FChunkTransmission.hpp;h=90dd35ebc0a7fdfb732af5b2c197c006fc939e84;hb=ae5a7e7d8517fac406a88e9bf98fd3d5bb1728b9;hp=0000000000000000000000000000000000000000;hpb=8e7e042296946ba2aed73b77ab02feb267eb17d4;p=blank.git diff --git a/src/net/ChunkTransmission.hpp b/src/net/ChunkTransmission.hpp new file mode 100644 index 0000000..90dd35e --- /dev/null +++ b/src/net/ChunkTransmission.hpp @@ -0,0 +1,40 @@ +#ifndef BLANK_NET_CHUNKTRANSMISSION_HPP_ +#define BLANK_NET_CHUNKTRANSMISSION_HPP_ + +#include "../world/Chunk.hpp" + +#include +#include + + +namespace blank { + +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