mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-03 06:09:07 +02:00
Biome: return FloatColor for block colors
This commit is contained in:
parent
50f798f89e
commit
19ef022a67
5 changed files with 53 additions and 49 deletions
|
@ -77,7 +77,8 @@ static void addChunk(Resource::Color image[DIM*DIM], uint8_t lightmap[2*DIM*DIM]
|
|||
const World::Chunk::Height &height = layer.v[x][z];
|
||||
World::Block block = chunk.getBlock(x, height, z);
|
||||
|
||||
image[i] = block.getColor(biomemaps[1][1].get()[i]);
|
||||
if (block.isVisible())
|
||||
image[i] = block.getColor(biomemaps[1][1].get()[i]);
|
||||
lightmap[2*i+1] = (1 - block.blockLight/15.f)*192;
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +260,6 @@ static void makeMap(const std::string ®iondir, const std::string &outputdir,
|
|||
}
|
||||
|
||||
std::unique_ptr<Resource::Color[]> image(new Resource::Color[DIM*DIM]);
|
||||
std::memset(image.get(), 0, 4*DIM*DIM);
|
||||
|
||||
std::unique_ptr<uint8_t[]> lightmap(new uint8_t[2*DIM*DIM]);
|
||||
std::memset(lightmap.get(), 0, 2*DIM*DIM);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue