the rest of the render modes are now working
This commit is contained in:
@@ -237,22 +237,22 @@ rendermode_cave_start(void *data, RenderState *state, PyObject *options) {
|
||||
}
|
||||
|
||||
/* if there's skylight we are in the surface! */
|
||||
self->skylight = PyObject_GetAttrString(state->self, "skylight");
|
||||
self->left_skylight = PyObject_GetAttrString(state->self, "left_skylight");
|
||||
self->right_skylight = PyObject_GetAttrString(state->self, "right_skylight");
|
||||
self->up_left_skylight = PyObject_GetAttrString(state->self, "up_left_skylight");
|
||||
self->up_right_skylight = PyObject_GetAttrString(state->self, "up_right_skylight");
|
||||
self->skylight = get_chunk_data(state, CURRENT, SKYLIGHT);
|
||||
self->left_skylight = get_chunk_data(state, DOWN_LEFT, SKYLIGHT);
|
||||
self->right_skylight = get_chunk_data(state, DOWN_RIGHT, SKYLIGHT);
|
||||
self->up_left_skylight = get_chunk_data(state, UP_LEFT, SKYLIGHT);
|
||||
self->up_right_skylight = get_chunk_data(state, UP_RIGHT, SKYLIGHT);
|
||||
|
||||
if (self->only_lit) {
|
||||
self->blocklight = PyObject_GetAttrString(state->self, "blocklight");
|
||||
self->left_blocklight = PyObject_GetAttrString(state->self, "left_blocklight");
|
||||
self->right_blocklight = PyObject_GetAttrString(state->self, "right_blocklight");
|
||||
self->up_left_blocklight = PyObject_GetAttrString(state->self, "up_left_blocklight");
|
||||
self->up_right_blocklight = PyObject_GetAttrString(state->self, "up_right_blocklight");
|
||||
self->blocklight = get_chunk_data(state, CURRENT, BLOCKLIGHT);
|
||||
self->left_blocklight = get_chunk_data(state, DOWN_LEFT, BLOCKLIGHT);
|
||||
self->right_blocklight = get_chunk_data(state, DOWN_RIGHT, BLOCKLIGHT);
|
||||
self->up_left_blocklight = get_chunk_data(state, UP_LEFT, BLOCKLIGHT);
|
||||
self->up_right_blocklight = get_chunk_data(state, UP_RIGHT, BLOCKLIGHT);
|
||||
}
|
||||
|
||||
/* colors for tinting */
|
||||
self->depth_colors = PyObject_GetAttrString(state->chunk, "depth_colors");
|
||||
self->depth_colors = PyObject_GetAttrString(state->support, "depth_colors");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ rendermode_overlay_start(void *data, RenderState *state, PyObject *options) {
|
||||
PyObject *facemasks_py;
|
||||
RenderModeOverlay *self = (RenderModeOverlay *)data;
|
||||
|
||||
facemasks_py = PyObject_GetAttrString(state->chunk, "facemasks");
|
||||
facemasks_py = PyObject_GetAttrString(state->support, "facemasks");
|
||||
/* borrowed reference, needs to be incref'd if we keep it */
|
||||
self->facemask_top = PyTuple_GetItem(facemasks_py, 0);
|
||||
Py_INCREF(self->facemask_top);
|
||||
Py_DECREF(facemasks_py);
|
||||
|
||||
self->white_color = PyObject_GetAttrString(state->chunk, "white_color");
|
||||
self->white_color = PyObject_GetAttrString(state->support, "white_color");
|
||||
self->get_color = get_color;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -69,8 +69,8 @@ rendermode_spawn_start(void *data, RenderState *state, PyObject *options) {
|
||||
|
||||
/* now do custom initializations */
|
||||
self = (RenderModeSpawn *)data;
|
||||
self->blocklight = PyObject_GetAttrString(state->self, "blocklight");
|
||||
self->skylight = PyObject_GetAttrString(state->self, "skylight");
|
||||
self->blocklight = get_chunk_data(state, CURRENT, BLOCKLIGHT);
|
||||
self->skylight = get_chunk_data(state, CURRENT, SKYLIGHT);
|
||||
|
||||
/* setup custom color */
|
||||
self->parent.get_color = get_color;
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
static RenderModeInterface *render_modes[] = {
|
||||
&rendermode_normal,
|
||||
&rendermode_lighting,
|
||||
/*&rendermode_smooth_lighting,
|
||||
&rendermode_spawn,
|
||||
&rendermode_smooth_lighting,
|
||||
&rendermode_cave,
|
||||
&rendermode_mineral,*/
|
||||
|
||||
&rendermode_spawn,
|
||||
&rendermode_mineral,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
4
setup.py
4
setup.py
@@ -149,8 +149,8 @@ except Exception:
|
||||
|
||||
|
||||
# used to figure out what files to compile
|
||||
#render_modes = ['normal', 'overlay', 'lighting', 'smooth-lighting', 'spawn', 'cave', 'mineral']
|
||||
render_modes = ['normal', 'lighting']
|
||||
render_modes = ['normal', 'lighting', 'smooth-lighting', 'cave']
|
||||
render_modes += ['overlay', 'spawn', 'mineral']
|
||||
|
||||
c_overviewer_files = ['main.c', 'composite.c', 'iterate.c', 'endian.c', 'rendermodes.c']
|
||||
c_overviewer_files += map(lambda mode: 'rendermode-%s.c' % (mode,), render_modes)
|
||||
|
||||
Reference in New Issue
Block a user