0

Propagate block, bool, standard integer types across codebase

Posix type integer pass

Propagate block, bool, integer types across codebase

Add standard integer types to prototypes
This commit is contained in:
Wunkolo
2019-06-25 10:20:38 -07:00
parent b6a3c18b65
commit d738c21852
31 changed files with 399 additions and 394 deletions

View File

@@ -49,16 +49,16 @@ typedef struct {
/* the name of this mode */
const char* name;
/* the size of the local storage for this rendermode */
unsigned int data_size;
uint32_t data_size;
/* may return non-zero on error, last arg is the python support object */
int (*start)(void*, RenderState*, PyObject*);
int32_t (*start)(void*, RenderState*, PyObject*);
void (*finish)(void*, RenderState*);
/* returns non-zero to skip rendering this block because it's not visible */
int (*occluded)(void*, RenderState*, int, int, int);
int32_t (*occluded)(void*, RenderState*, int, int, int);
/* returns non-zero to skip rendering this block because the user doesn't
* want it visible */
int (*hidden)(void*, RenderState*, int, int, int);
int32_t (*hidden)(void*, RenderState*, int, int, int);
/* last two arguments are img and mask, from texture lookup */
void (*draw)(void*, RenderState*, PyObject*, PyObject*, PyObject*);
} RenderPrimitiveInterface;
@@ -86,7 +86,7 @@ typedef struct {
/* wrapper for passing around rendermodes */
struct _RenderMode {
unsigned int num_primitives;
uint32_t num_primitives;
RenderPrimitive** primitives;
RenderState* state;
};
@@ -94,12 +94,12 @@ struct _RenderMode {
/* functions for creating / using rendermodes */
RenderMode* render_mode_create(PyObject* mode, RenderState* state);
void render_mode_destroy(RenderMode* self);
int render_mode_occluded(RenderMode* self, int x, int y, int z);
int render_mode_hidden(RenderMode* self, int x, int y, int z);
int32_t render_mode_occluded(RenderMode* self, int32_t x, int32_t y, int32_t z);
int32_t render_mode_hidden(RenderMode* self, int32_t x, int32_t y, int32_t z);
void render_mode_draw(RenderMode* self, PyObject* img, PyObject* mask, PyObject* mask_light);
/* helper function for reading in rendermode options
works like PyArg_ParseTuple on a support object */
int render_mode_parse_option(PyObject* support, const char* name, const char* format, ...);
int32_t render_mode_parse_option(PyObject* support, const char* name, const char* format, ...);
#endif /* __RENDERMODES_H_INCLUDED__ */