mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-03 06:09:07 +02:00
Add biome color computation
Rather than using fixed values for all biomes, generate grass and foliage colors based on (height-dependent) temperature and rainfall parameters. This changes a lot of colors; in general, the new colors should be closer to the actual Minecraft rendering. It also fixes a few colors that were completely off (like in the badlands biomes) and adds the MC 1.13 biomes (which were rendered in black). Some of the newer biomes (warm/cold/... oceans) don't have proper parameters yet, and we do not derive the water color from the biome yet. Fixes #1.
This commit is contained in:
parent
4ffa28dd63
commit
0bdf249307
7 changed files with 382 additions and 219 deletions
|
@ -51,7 +51,7 @@ namespace MinedMap {
|
|||
static const size_t DIM = World::Region::SIZE*World::Chunk::SIZE;
|
||||
|
||||
|
||||
static void addChunk(World::Block::Color image[DIM*DIM], uint8_t lightmap[2*DIM*DIM], size_t X, size_t Z, const World::ChunkData *data) {
|
||||
static void addChunk(Resource::Color image[DIM*DIM], uint8_t lightmap[2*DIM*DIM], size_t X, size_t Z, const World::ChunkData *data) {
|
||||
World::Chunk chunk(data);
|
||||
World::Chunk::Blocks layer = chunk.getTopLayer();
|
||||
|
||||
|
@ -137,7 +137,7 @@ static void doRegion(const std::string &input, const std::string &output, const
|
|||
std::printf("Generating %s from %s...\n", output.c_str(), input.c_str());
|
||||
|
||||
try {
|
||||
std::unique_ptr<World::Block::Color[]> image(new World::Block::Color[DIM*DIM]);
|
||||
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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue