diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-07-20 23:33:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-07-20 23:49:51 +0200 |
commit | c082c8800c42d6f9da98ed985babc8ad2c2265a7 (patch) | |
tree | 1afd73b8d96e67d6446a855eb5903c59ebb0d113 /src/World/Chunk.hpp | |
parent | 4b9bb2ab4894c52f60baba3273c27948ad022292 (diff) | |
download | MinedMap-c082c8800c42d6f9da98ed985babc8ad2c2265a7.tar MinedMap-c082c8800c42d6f9da98ed985babc8ad2c2265a7.zip |
Separate splitting of regions into chunks and actual parsing of chunk structure
Diffstat (limited to 'src/World/Chunk.hpp')
-rw-r--r-- | src/World/Chunk.hpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index a08f9e6..d4213b3 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2015, Matthias Schiffer <mschiffer@universe-factory.net> + Copyright (c) 2015-2018, Matthias Schiffer <mschiffer@universe-factory.net> All rights reserved. Redistribution and use in source and binary forms, with or without @@ -28,10 +28,8 @@ #include "Block.hpp" -#include "../Buffer.hpp" -#include "../UniqueCPtr.hpp" +#include "ChunkData.hpp" #include "../Util.hpp" -#include "../NBT/CompoundTag.hpp" #include "../NBT/ListTag.hpp" #include "../NBT/ByteTag.hpp" #include "../NBT/ByteArrayTag.hpp" @@ -53,10 +51,6 @@ public: private: - size_t len; - UniqueCPtr<uint8_t[]> data; - - std::shared_ptr<const NBT::CompoundTag> root; std::shared_ptr<const NBT::CompoundTag> level; std::shared_ptr<const NBT::ListTag<NBT::CompoundTag>> sections; @@ -106,13 +100,8 @@ private: return biomes[z*SIZE + x]; } - - void inflateChunk(Buffer buffer); - void parseChunk(); - void analyzeChunk(); - public: - Chunk(Buffer buffer); + Chunk(const ChunkData *data); const NBT::CompoundTag & getLevel() const { return *level; |