Clean up build warnings on Windows
This commit is contained in:
@@ -62,7 +62,7 @@ imaging_python_to_c(PyObject *obj)
|
||||
in these composite functions -- even handles auto-sizing to src! */
|
||||
static inline void
|
||||
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 */
|
||||
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 */
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ inline PyObject* alpha_over(PyObject *dest, PyObject *src, PyObject *mask,
|
||||
*/
|
||||
inline 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) {
|
||||
/* libImaging handles */
|
||||
Imaging imDest, imSrc, imMask;
|
||||
/* cached blend properties */
|
||||
@@ -285,7 +285,7 @@ alpha_over_wrap(PyObject *self, PyObject *args)
|
||||
PyObject *
|
||||
tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg,
|
||||
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 */
|
||||
Imaging imDest, imMask;
|
||||
/* cached blend properties */
|
||||
|
||||
@@ -49,13 +49,13 @@
|
||||
/* in composite.c */
|
||||
Imaging imaging_python_to_c(PyObject *obj);
|
||||
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,
|
||||
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 *tint_with_mask(PyObject *dest, unsigned char sr, unsigned char sg,
|
||||
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,
|
||||
int x0, int y0,
|
||||
unsigned char r0, unsigned char g0, unsigned char b0,
|
||||
|
||||
@@ -39,33 +39,33 @@ typedef struct {
|
||||
*/
|
||||
static Biome biome_table[] = {
|
||||
/* 0 */
|
||||
{"Ocean", 0.5, 0.5},
|
||||
{"Plains", 0.8, 0.4},
|
||||
{"Desert", 2.0, 0.0},
|
||||
{"Extreme Hills", 0.2, 0.3},
|
||||
{"Forest", 0.7, 0.8},
|
||||
{"Ocean", 0.5f, 0.5f},
|
||||
{"Plains", 0.8f, 0.4f},
|
||||
{"Desert", 2.0f, 0.0f},
|
||||
{"Extreme Hills", 0.2f, 0.3f},
|
||||
{"Forest", 0.7f, 0.8f},
|
||||
/* 5 */
|
||||
{"Taiga", 0.05, 0.8},
|
||||
{"Swampland", 0.8, 0.9},
|
||||
{"River", 0.5, 0.5},
|
||||
{"Hell", 2.0, 0.0},
|
||||
{"Sky", 0.5, 0.5},
|
||||
{"Taiga", 0.05f, 0.8f},
|
||||
{"Swampland", 0.8f, 0.9f},
|
||||
{"River", 0.5f, 0.5f},
|
||||
{"Hell", 2.0f, 0.0f},
|
||||
{"Sky", 0.5f, 0.5f},
|
||||
/* 10 */
|
||||
{"FrozenOcean", 0.0, 0.5},
|
||||
{"FrozenRiver", 0.0, 0.5},
|
||||
{"Ice Plains", 0.0, 0.5},
|
||||
{"Ice Mountains", 0.0, 0.5},
|
||||
{"MushroomIsland", 0.9, 1.0},
|
||||
{"FrozenOcean", 0.0f, 0.5f},
|
||||
{"FrozenRiver", 0.0f, 0.5f},
|
||||
{"Ice Plains", 0.0f, 0.5f},
|
||||
{"Ice Mountains", 0.0f, 0.5f},
|
||||
{"MushroomIsland", 0.9f, 1.0f},
|
||||
/* 15 */
|
||||
{"MushroomIslandShore", 0.9, 1.0},
|
||||
{"Beach", 0.8, 0.4},
|
||||
{"DesertHills", 2.0, 0.0},
|
||||
{"ForestHills", 0.7, 0.8},
|
||||
{"TaigaHills", 0.05, 0.8},
|
||||
{"MushroomIslandShore", 0.9f, 1.0f},
|
||||
{"Beach", 0.8f, 0.4f},
|
||||
{"DesertHills", 2.0f, 0.0f},
|
||||
{"ForestHills", 0.7f, 0.8f},
|
||||
{"TaigaHills", 0.05f, 0.8f},
|
||||
/* 20 */
|
||||
{"Extreme Hills Edge", 0.2, 0.3},
|
||||
{"Jungle", 2.0, 0.45}, /* <-- GUESS, but a good one */
|
||||
{"Jungle Mountains", 2.0, 0.45}, /* <-- also a guess */
|
||||
{"Extreme Hills Edge", 0.2f, 0.3f},
|
||||
{"Jungle", 2.0f, 0.45f}, /* <-- GUESS, but a good one */
|
||||
{"Jungle Mountains", 2.0f, 0.45f}, /* <-- also a guess */
|
||||
};
|
||||
|
||||
#define NUM_BIOMES (sizeof(biome_table) / sizeof(Biome))
|
||||
|
||||
Reference in New Issue
Block a user