X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/5b0ab052105670986ec973f035b758add4d25481..08d7c4ba7266c626d28273750218446d3c693805:/bridges.c diff --git a/bridges.c b/bridges.c index 721d75f..be173ff 100644 --- a/bridges.c +++ b/bridges.c @@ -1012,7 +1012,7 @@ static int grid_degree(game_state *state, int x, int y, int *nx_r, int *ny_r) static int map_hasloops(game_state *state, int mark) { - int x, y, ox, oy, nx, ny, loop = 0; + int x, y, ox, oy, nx = 0, ny = 0, loop = 0; memcpy(state->scratch, state->grid, GRIDSZ(state)); @@ -1800,11 +1800,11 @@ generated: echeck = 0; for (x = 0; x < params->w; x++) { if (INDEX(tobuild, gridi, x, 0)) echeck |= 1; - if (INDEX(tobuild, gridi, x, params->w-1)) echeck |= 2; + if (INDEX(tobuild, gridi, x, params->h-1)) echeck |= 2; } for (y = 0; y < params->h; y++) { if (INDEX(tobuild, gridi, 0, y)) echeck |= 4; - if (INDEX(tobuild, gridi, params->h-1, y)) echeck |= 8; + if (INDEX(tobuild, gridi, params->w-1, y)) echeck |= 8; } if (echeck != 15) { debug(("Generated grid doesn't fill to sides, retrying.\n")); @@ -2401,9 +2401,9 @@ static void lines_redraw(drawing *dr, draw_update(dr, ox, oy, TILE_SIZE, TILE_SIZE); } -#define ISLAND_RADIUS ((TILE_SIZE*13)/20) +#define ISLAND_RADIUS ((TILE_SIZE*12)/20) #define ISLAND_NUMSIZE(is) \ - (((is)->count < 10) ? TILE_SIZE : (TILE_SIZE*8)/10) + (((is)->count < 10) ? (TILE_SIZE*7)/10 : (TILE_SIZE*5)/10) static void island_redraw(drawing *dr, game_state *state, game_drawstate *ds,