0

birch and pine leaves now look different from each other

This commit is contained in:
Aaron Griffith
2011-09-19 21:19:08 -04:00
parent 4e3a92874c
commit b5c86b6bca
2 changed files with 17 additions and 2 deletions

View File

@@ -210,7 +210,19 @@ rendermode_normal_draw(void *data, RenderState *state, PyObject *src, PyObject *
break;
case 18:
/* leaves */
color = PySequence_GetItem(self->foliagecolor, index);
if (state->block_data != 2)
{
/* not birch! */
color = PySequence_GetItem(self->foliagecolor, index);
} else {
/* birch!
birch foliage color is flipped XY-ways */
unsigned int index_x = 255 - (index % 256);
unsigned int index_y = 255 - (index / 256);
index = index_y * 256 + index_x;
color = PySequence_GetItem(self->foliagecolor, index);
}
break;
case 31:
/* tall grass */