0

Clean up build warnings on Windows

This commit is contained in:
Andrew Chin
2012-03-01 23:23:52 -05:00
parent 20f9f92abd
commit 868256b538
3 changed files with 30 additions and 30 deletions

View File

@@ -62,7 +62,7 @@ imaging_python_to_c(PyObject *obj)
in these composite functions -- even handles auto-sizing to src! */ in these composite functions -- even handles auto-sizing to src! */
static inline void static inline void
setup_source_destination(Imaging src, Imaging dest, setup_source_destination(Imaging src, Imaging dest,
int *sx, int *sy, int *dx, int *dy, int *xsize, int *ysize) int *sx, int *sy, int *dx, int *dy, unsigned int *xsize, unsigned int *ysize)
{ {
/* handle negative/zero sizes appropriately */ /* handle negative/zero sizes appropriately */
if (*xsize <= 0 || *ysize <= 0) { if (*xsize <= 0 || *ysize <= 0) {
@@ -99,7 +99,7 @@ setup_source_destination(Imaging src, Imaging dest,
/* convenience alpha_over with 1.0 as overall_alpha */ /* convenience alpha_over with 1.0 as overall_alpha */
inline PyObject* alpha_over(PyObject *dest, PyObject *src, PyObject *mask, inline PyObject* alpha_over(PyObject *dest, PyObject *src, PyObject *mask,
int dx, int dy, int xsize, int ysize) { int dx, int dy, unsigned int xsize, unsigned int ysize) {
return alpha_over_full(dest, src, mask, 1.0f, dx, dy, xsize, ysize); return alpha_over_full(dest, src, mask, 1.0f, dx, dy, xsize, ysize);
} }
@@ -110,7 +110,7 @@ inline PyObject* alpha_over(PyObject *dest, PyObject *src, PyObject *mask,
*/ */
inline PyObject * inline PyObject *
alpha_over_full(PyObject *dest, PyObject *src, PyObject *mask, float overall_alpha, alpha_over_full(PyObject *dest, PyObject *src, PyObject *mask, float overall_alpha,
int dx, int dy, int xsize, int ysize) { int dx, int dy, unsigned int xsize, unsigned int ysize) {
/* libImaging handles */ /* libImaging handles */
Imaging imDest, imSrc, imMask; Imaging imDest, imSrc, imMask;
/* cached blend properties */ /* cached blend properties */
@@ -285,7 +285,7 @@ alpha_over_wrap(PyObject *self, PyObject *args)
PyObject * PyObject *
tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg, tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg,
unsigned char sb, unsigned char sa, unsigned char sb, unsigned char sa,
PyObject *mask, int dx, int dy, int xsize, int ysize) { PyObject *mask, int dx, int dy, unsigned int xsize, unsigned int ysize) {
/* libImaging handles */ /* libImaging handles */
Imaging imDest, imMask; Imaging imDest, imMask;
/* cached blend properties */ /* cached blend properties */

View File

@@ -49,13 +49,13 @@
/* in composite.c */ /* in composite.c */
Imaging imaging_python_to_c(PyObject *obj); Imaging imaging_python_to_c(PyObject *obj);
PyObject *alpha_over(PyObject *dest, PyObject *src, PyObject *mask, PyObject *alpha_over(PyObject *dest, PyObject *src, PyObject *mask,
int dx, int dy, int xsize, int ysize); int dx, int dy, unsigned int xsize, unsigned int ysize);
PyObject *alpha_over_full(PyObject *dest, PyObject *src, PyObject *mask, float overall_alpha, PyObject *alpha_over_full(PyObject *dest, PyObject *src, PyObject *mask, float overall_alpha,
int dx, int dy, int xsize, int ysize); int dx, int dy, unsigned int xsize, unsigned int ysize);
PyObject *alpha_over_wrap(PyObject *self, PyObject *args); PyObject *alpha_over_wrap(PyObject *self, PyObject *args);
PyObject *tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg, PyObject *tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg,
unsigned char sb, unsigned char sa, unsigned char sb, unsigned char sa,
PyObject *mask, int dx, int dy, int xsize, int ysize); PyObject *mask, int dx, int dy, unsigned int xsize, unsigned int ysize);
PyObject *draw_triangle(PyObject *dest, int inclusive, PyObject *draw_triangle(PyObject *dest, int inclusive,
int x0, int y0, int x0, int y0,
unsigned char r0, unsigned char g0, unsigned char b0, unsigned char r0, unsigned char g0, unsigned char b0,

View File

@@ -39,33 +39,33 @@ typedef struct {
*/ */
static Biome biome_table[] = { static Biome biome_table[] = {
/* 0 */ /* 0 */
{"Ocean", 0.5, 0.5}, {"Ocean", 0.5f, 0.5f},
{"Plains", 0.8, 0.4}, {"Plains", 0.8f, 0.4f},
{"Desert", 2.0, 0.0}, {"Desert", 2.0f, 0.0f},
{"Extreme Hills", 0.2, 0.3}, {"Extreme Hills", 0.2f, 0.3f},
{"Forest", 0.7, 0.8}, {"Forest", 0.7f, 0.8f},
/* 5 */ /* 5 */
{"Taiga", 0.05, 0.8}, {"Taiga", 0.05f, 0.8f},
{"Swampland", 0.8, 0.9}, {"Swampland", 0.8f, 0.9f},
{"River", 0.5, 0.5}, {"River", 0.5f, 0.5f},
{"Hell", 2.0, 0.0}, {"Hell", 2.0f, 0.0f},
{"Sky", 0.5, 0.5}, {"Sky", 0.5f, 0.5f},
/* 10 */ /* 10 */
{"FrozenOcean", 0.0, 0.5}, {"FrozenOcean", 0.0f, 0.5f},
{"FrozenRiver", 0.0, 0.5}, {"FrozenRiver", 0.0f, 0.5f},
{"Ice Plains", 0.0, 0.5}, {"Ice Plains", 0.0f, 0.5f},
{"Ice Mountains", 0.0, 0.5}, {"Ice Mountains", 0.0f, 0.5f},
{"MushroomIsland", 0.9, 1.0}, {"MushroomIsland", 0.9f, 1.0f},
/* 15 */ /* 15 */
{"MushroomIslandShore", 0.9, 1.0}, {"MushroomIslandShore", 0.9f, 1.0f},
{"Beach", 0.8, 0.4}, {"Beach", 0.8f, 0.4f},
{"DesertHills", 2.0, 0.0}, {"DesertHills", 2.0f, 0.0f},
{"ForestHills", 0.7, 0.8}, {"ForestHills", 0.7f, 0.8f},
{"TaigaHills", 0.05, 0.8}, {"TaigaHills", 0.05f, 0.8f},
/* 20 */ /* 20 */
{"Extreme Hills Edge", 0.2, 0.3}, {"Extreme Hills Edge", 0.2f, 0.3f},
{"Jungle", 2.0, 0.45}, /* <-- GUESS, but a good one */ {"Jungle", 2.0f, 0.45f}, /* <-- GUESS, but a good one */
{"Jungle Mountains", 2.0, 0.45}, /* <-- also a guess */ {"Jungle Mountains", 2.0f, 0.45f}, /* <-- also a guess */
}; };
#define NUM_BIOMES (sizeof(biome_table) / sizeof(Biome)) #define NUM_BIOMES (sizeof(biome_table) / sizeof(Biome))