From 1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 May 2017 19:01:56 +0500 Subject: 2017-05-13 --- code/World.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 code/World.hpp (limited to 'code/World.hpp') diff --git a/code/World.hpp b/code/World.hpp new file mode 100644 index 0000000..1f35585 --- /dev/null +++ b/code/World.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include +#include +#include "Block.hpp" +#include "Packet.hpp" +#include "Section.hpp" + +class World { + //utility vars + World(const World& other); + World&operator=(const World &other); + bool isContinue=true; + std::mutex m_parseSectionMutex; + std::condition_variable m_parseSectionWaiter; + std::thread m_sectionParseThread; + std::queue::iterator> m_sectionToParse; + //utility methods + void SectionParsingThread(); + //game vars + int m_dimension = 0; + //game methods + Section ParseSection(byte *data, size_t &dataLen); +public: + World(); + ~World(); + void ParseChunkData(Packet packet); + std::map m_sections; +}; \ No newline at end of file -- cgit v1.2.3