From 56a2e1f8340cc955435f88189169715118003a0a Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Thu, 9 Jun 2011 11:45:36 -0400 Subject: [PATCH] Move decl to top of block --- src/rendermode-normal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendermode-normal.c b/src/rendermode-normal.c index b112192..c6a7ab9 100644 --- a/src/rendermode-normal.c +++ b/src/rendermode-normal.c @@ -126,6 +126,7 @@ static void rendermode_normal_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyObject *mask_light) { RenderModeNormal *self = (RenderModeNormal *)data; int randx = 0,randy = 0; + unsigned char data; /* first, check to see if we should use biome-compatible src, mask */ if (self->biome_data) { @@ -137,7 +138,7 @@ rendermode_normal_draw(void *data, RenderState *state, PyObject *src, PyObject * randy = rand() % 6 + 1 - 3; state->imgx = state->imgx + randx; state->imgy = state->imgy + randy; - unsigned char data = getArrayByte3D(state->blockdata_expanded, state->x, state->y, state->z); + data = getArrayByte3D(state->blockdata_expanded, state->x, state->y, state->z); if (data == 1) { src = mask = self->tall_grass_texture; } else if (data == 2) {