Write PNG files

No biome colors or light levels yet...
This commit is contained in:
Matthias Schiffer 2015-02-01 11:58:50 +01:00
parent cd45c4009c
commit d26fe3d9f8
6 changed files with 330 additions and 15 deletions

View file

@ -25,6 +25,7 @@
#include "Chunk.hpp"
#include "BlockType.hpp"
#include "../Util.hpp"
#include "../NBT/ByteTag.hpp"
#include "../NBT/ByteArrayTag.hpp"
@ -143,7 +144,7 @@ Chunk::Blocks Chunk::getTopLayer() const {
continue;
uint8_t block = getBlockAt(*it, x, y, z);
if (block) {
if (BLOCK_TYPES[block].opaque) {
blocks.blocks[x][z].id = block;
blocks.blocks[x][z].data = getDataAt(*it, x, y, z);
done++;
@ -153,8 +154,6 @@ Chunk::Blocks Chunk::getTopLayer() const {
}
}
std::cerr << "Done: " << done << std::endl;
return blocks;
}