diff --git a/overviewer_core/src/composite.c b/overviewer_core/src/composite.c index 32425cf..47e3afe 100644 --- a/overviewer_core/src/composite.c +++ b/overviewer_core/src/composite.c @@ -113,7 +113,8 @@ alpha_over_full(PyObject* dest, PyObject* src, PyObject* mask, float overall_alp /* source position */ int32_t sx, sy; /* iteration variables */ - uint32_t x, y, i; + int32_t x, y; + uint32_t i; /* temporary calculation variables */ int32_t tmp1, tmp2, tmp3; /* integer [0, 255] version of overall_alpha */ @@ -289,7 +290,7 @@ tint_with_mask(PyObject* dest, /* source position */ int32_t sx, sy; /* iteration variables */ - uint32_t x, y; + int32_t x, y; /* temporary calculation variables */ int32_t tmp1, tmp2; @@ -517,7 +518,7 @@ resize_half(PyObject* dest, PyObject* src) { /* temp color variables */ uint32_t r, g, b, a; /* size values for source and destination */ - int32_t src_width, src_height, dest_width, dest_height; + uint32_t src_width, src_height, dest_width, dest_height; imDest = imaging_python_to_c(dest); imSrc = imaging_python_to_c(src); diff --git a/overviewer_core/src/primitives/depth.c b/overviewer_core/src/primitives/depth.c index 5f9eb4a..0038a96 100644 --- a/overviewer_core/src/primitives/depth.c +++ b/overviewer_core/src/primitives/depth.c @@ -18,8 +18,8 @@ #include "../overviewer.h" typedef struct { - uint32_t min; - uint32_t max; + int32_t min; + int32_t max; } PrimitiveDepth; static bool diff --git a/overviewer_core/src/primitives/lighting.c b/overviewer_core/src/primitives/lighting.c index f4e61fd..6390b56 100644 --- a/overviewer_core/src/primitives/lighting.c +++ b/overviewer_core/src/primitives/lighting.c @@ -241,7 +241,7 @@ do_shading_with_mask(RenderPrimitiveLighting* self, RenderState* state, tint_with_mask(state->img, r, g, b, 255, mask, state->imgx, state->imgy, 0, 0); } -static int32_t +static bool lighting_start(void* data, RenderState* state, PyObject* support) { RenderPrimitiveLighting* self; self = (RenderPrimitiveLighting*)data; diff --git a/overviewer_core/src/primitives/overlay-biomes.c b/overviewer_core/src/primitives/overlay-biomes.c index ab6df13..7a20b47 100644 --- a/overviewer_core/src/primitives/overlay-biomes.c +++ b/overviewer_core/src/primitives/overlay-biomes.c @@ -146,7 +146,7 @@ overlay_biomes_start(void* data, RenderState* state, PyObject* support) { for (i = 0; i < biomes_size; i++) { PyObject* biome = PyList_GET_ITEM(opt, i); char* tmpname = NULL; - int32_t j = 0; + uint32_t j = 0; if (!PyArg_ParseTuple(biome, "s(bbb)", &tmpname, &(biomes[i].r), &(biomes[i].g), &(biomes[i].b))) { free(biomes); diff --git a/overviewer_core/src/primitives/overlay.c b/overviewer_core/src/primitives/overlay.c index ed42e6f..acd4258 100644 --- a/overviewer_core/src/primitives/overlay.c +++ b/overviewer_core/src/primitives/overlay.c @@ -28,7 +28,7 @@ static void get_color(void* data, RenderState* state, *a = self->color->a; } -static int32_t +static bool overlay_start(void* data, RenderState* state, PyObject* support) { PyObject* opt = NULL; OverlayColor* color = NULL; diff --git a/overviewer_core/src/primitives/smooth-lighting.c b/overviewer_core/src/primitives/smooth-lighting.c index 7f50c56..e2b8271 100644 --- a/overviewer_core/src/primitives/smooth-lighting.c +++ b/overviewer_core/src/primitives/smooth-lighting.c @@ -198,8 +198,8 @@ smooth_lighting_finish(void* data, RenderState* state) { static void smooth_lighting_draw(void* data, RenderState* state, PyObject* src, PyObject* mask, PyObject* mask_light) { - bool light_top = true; - bool light_left = true; + bool light_top = true; + bool light_left = true; bool light_right = true; RenderPrimitiveSmoothLighting* self = (RenderPrimitiveSmoothLighting*)data;