private RenderChunkBiomes ( |
||
c | ||
b | ||
offsetX | int | |
offsetY | int | |
리턴 | void |
private void RenderChunkBiomes(Chunk c, Bitmap b, int offsetX, int offsetY)
{
TAG t = null;
if (c.Root["Level"].TryGetValue("Biomes", out t))
{
byte[] biomes = (byte[])t;
for (int z = 0; z < 16; z++)
{
for (int x = 0; x < 16; x++)
{
byte biome = biomes[x + z * 16];
Color color = ColorPalette.Lookup(biome);
b.SetPixel(offsetX + x, offsetY + z, color);
}
}
}
else
{
Color color = ColorPalette.Lookup(255);
for (int z = 0; z < 16; z++)
{
for (int x = 0; x < 16; x++)
{
b.SetPixel(offsetX + x, offsetY + z, color);
}
}
}
}