removed some blocks from solid_blocks, fixed overlays on snow, half-steps
This commit is contained in:
2
chunk.py
2
chunk.py
@@ -120,7 +120,7 @@ transparent_blocks = set([0, 6, 8, 9, 18, 20, 37, 38, 39, 40, 44, 50, 51, 52, 53
|
|||||||
# This set holds block ids that are solid blocks
|
# This set holds block ids that are solid blocks
|
||||||
solid_blocks = set([1, 2, 3, 4, 5, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
solid_blocks = set([1, 2, 3, 4, 5, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||||
23, 24, 25, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49, 53, 54, 56, 57, 58, 60,
|
23, 24, 25, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49, 53, 54, 56, 57, 58, 60,
|
||||||
61, 62, 64, 65, 66, 67, 71, 73, 74, 78, 79, 80, 81, 82, 84, 86, 87, 88, 89, 91, 92])
|
61, 62, 67, 73, 74, 78, 79, 80, 81, 82, 84, 86, 87, 88, 89, 91])
|
||||||
|
|
||||||
# This set holds block ids that are fluid blocks
|
# This set holds block ids that are fluid blocks
|
||||||
fluid_blocks = set([8,9,10,11])
|
fluid_blocks = set([8,9,10,11])
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ rendermode_overlay_draw(void *data, RenderState *state, PyObject *src, PyObject
|
|||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
PyObject *top_block_py, *block_py;
|
PyObject *top_block_py, *block_py;
|
||||||
|
|
||||||
|
// exactly analogous to edge-line code for these special blocks
|
||||||
|
int increment=0;
|
||||||
|
if (state->block == 44) // half-step
|
||||||
|
increment=6;
|
||||||
|
else if (state->block == 78) // snow
|
||||||
|
increment=9;
|
||||||
|
|
||||||
/* clear the draw space -- set alpha to 0 within mask */
|
/* clear the draw space -- set alpha to 0 within mask */
|
||||||
tint_with_mask(state->img, 255, 255, 255, 0, mask, state->imgx, state->imgy, 0, 0);
|
tint_with_mask(state->img, 255, 255, 255, 0, mask, state->imgx, state->imgy, 0, 0);
|
||||||
|
|
||||||
@@ -114,8 +121,8 @@ rendermode_overlay_draw(void *data, RenderState *state, PyObject *src, PyObject
|
|||||||
|
|
||||||
/* do the overlay */
|
/* do the overlay */
|
||||||
if (a > 0) {
|
if (a > 0) {
|
||||||
alpha_over(state->img, self->white_color, self->facemask_top, state->imgx, state->imgy, 0, 0);
|
alpha_over(state->img, self->white_color, self->facemask_top, state->imgx, state->imgy + increment, 0, 0);
|
||||||
tint_with_mask(state->img, r, g, b, a, self->facemask_top, state->imgx, state->imgy, 0, 0);
|
tint_with_mask(state->img, r, g, b, a, self->facemask_top, state->imgx, state->imgy + increment, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user