From c81a7aa1621326827088142fa5cc484bbcca9535 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sun, 28 May 2017 23:52:23 -0400 Subject: [PATCH] pokemon_animation_graphics: remove declarations from for loops --- tools/pokemon_animation_graphics.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/pokemon_animation_graphics.c b/tools/pokemon_animation_graphics.c index 3d79960e4..f38850fb0 100644 --- a/tools/pokemon_animation_graphics.c +++ b/tools/pokemon_animation_graphics.c @@ -43,7 +43,8 @@ void transpose_tiles(uint8_t* tiles, int width, int size, int tile_size) { } bool compare_tile(uint8_t *tile, uint8_t *other) { - for (int j = 0; j < 16; j++) { + int j; + for (j = 0; j < 16; j++) { if (tile[j] != other[j]) { return false; } @@ -58,7 +59,8 @@ int get_tile_index(uint8_t* tile, uint8_t* tiles, int num_tiles, int preferred_t return preferred_tile_id; } } - for (int i = 0; i < num_tiles; i++) { + int i; + for (i = 0; i < num_tiles; i++) { uint8_t *other = &tiles[i * 16]; if (compare_tile(tile, other)) { return i;