Do not store biome in block structure

Use biome data from biome map.
This commit is contained in:
Matthias Schiffer 2020-06-19 23:50:01 +02:00
parent a3cf5edda4
commit 50f798f89e
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 9 additions and 7 deletions

View file

@ -38,10 +38,9 @@ struct Block {
const Resource::BlockType *type;
unsigned depth;
uint8_t blockLight;
uint8_t biome;
Resource::Color getColor() const {
Resource::Color getColor(uint8_t biome) const {
if (!type || !(type->flags & BLOCK_OPAQUE))
return Resource::Color {};

View file

@ -85,7 +85,6 @@ Block Chunk::getBlock(size_t x, Chunk::Height height, size_t z) const {
Block block = {};
block.depth = height.depth;
block.biome = getBiome(x, height.y, z);
size_t Y = height.y / SIZE;
size_t y = height.y % SIZE;