0

moved important render state into a struct, to prepare for modular render modes

(making the code look worse, so it can look better!)
This commit is contained in:
Aaron Griffith
2011-03-21 06:40:37 -04:00
parent da58be569f
commit 7b7f97d6c5
2 changed files with 54 additions and 41 deletions

View File

@@ -36,6 +36,22 @@ PyObject *alpha_over_wrap(PyObject *self, PyObject *args);
PyObject *brightness(PyObject *img, double factor);
/* in iterate.c */
typedef struct {
/* the ChunkRenderer object */
PyObject *self;
/* important modules, for convenience */
PyObject *textures;
PyObject *chunk;
/* the tile image and destination */
PyObject *img;
int imgx, imgy;
/* the block position and type */
int x, y, z;
unsigned char block;
} RenderState;
int is_transparent(PyObject* tup, unsigned char b);
PyObject *chunk_render(PyObject *self, PyObject *args);
int init_chunk_render(void);