0

c_overviewer is now auto-initialized, and some other minor fixes

This commit is contained in:
Aaron Griffith
2012-01-02 00:40:56 -05:00
parent fbb5230849
commit a1dc392526
5 changed files with 11 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ static PyObject *solid_blocks = NULL;
static PyObject *fluid_blocks = NULL;
static PyObject *nospawn_blocks = NULL;
PyObject *init_chunk_render(PyObject *self, PyObject *args) {
PyObject *init_chunk_render(void) {
PyObject *tmp = NULL;
unsigned int i;

View File

@@ -30,8 +30,6 @@ static PyMethodDef COverviewerMethods[] = {
{"alpha_over", alpha_over_wrap, METH_VARARGS,
"alpha over composite function"},
{"init_chunk_render", init_chunk_render, METH_VARARGS,
"Initializes the stuffs renderer."},
{"render_loop", chunk_render, METH_VARARGS,
"Renders stuffs"},
@@ -63,6 +61,13 @@ initc_overviewer(void)
/* for numpy */
import_array();
/* initialize, and return if error is set */
if (!init_chunk_render()) {
PyErr_Print();
exit(1);
return;
}
/* create the render mode data structures, and attatch them to the module
* so that the Python garbage collector doesn't freak out

View File

@@ -93,7 +93,7 @@ typedef struct {
PyObject *left_blocks;
PyObject *right_blocks;
} RenderState;
PyObject *init_chunk_render(PyObject *self, PyObject *args);
PyObject *init_chunk_render(void);
PyObject *chunk_render(PyObject *self, PyObject *args);
typedef enum
{