summaryrefslogtreecommitdiffstats
path: root/src/World/Chunk.hpp
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-02-01 06:04:56 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-02-01 06:04:56 +0100
commit2d2671a6866864bc8fb927a63e2d6eecddff3d6a (patch)
tree358024f587b5faa6d275532bf83448a2da94df68 /src/World/Chunk.hpp
parent18ed3d4c5df83336229357cf8e468c8db7c4f7ca (diff)
downloadMinedMap-2d2671a6866864bc8fb927a63e2d6eecddff3d6a.tar
MinedMap-2d2671a6866864bc8fb927a63e2d6eecddff3d6a.zip
Use buffer API for chunk decompression
Diffstat (limited to 'src/World/Chunk.hpp')
-rw-r--r--src/World/Chunk.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp
index 36628b4..d063d48 100644
--- a/src/World/Chunk.hpp
+++ b/src/World/Chunk.hpp
@@ -27,6 +27,7 @@
#pragma once
+#include "../Buffer.hpp"
#include "../UniqueCPtr.hpp"
#include "../NBT/CompoundTag.hpp"
#include "../NBT/ListTag.hpp"
@@ -51,7 +52,7 @@ private:
unsigned maxY;
- void inflateChunk(uint8_t *data, size_t len);
+ void inflateChunk(Buffer buffer);
void parseChunk();
void analyzeChunk();
@@ -66,7 +67,7 @@ private:
uint8_t getDataAt(const std::shared_ptr<const NBT::CompoundTag> &section, size_t x, size_t y, size_t z);
public:
- Chunk(uint8_t *buffer, size_t buflen);
+ Chunk(Buffer buffer);
const NBT::ListTag<NBT::CompoundTag> & getSections() const {
return *sections;