X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/aa8ccc556dd3f14f587d1661ba228c3311f15b2d..d7bd2e39f66f09f4d8e37c779ec220b433141adc:/lightup.c diff --git a/lightup.c b/lightup.c index 14c6974..4f4f569 100644 --- a/lightup.c +++ b/lightup.c @@ -2077,10 +2077,19 @@ static void tile_redraw(drawing *dr, game_drawstate *ds, game_state *state, int lcol = (ds_flags & DF_OVERLAP) ? COL_ERROR : COL_LIGHT; draw_circle(dr, dx + TILE_SIZE/2, dy + TILE_SIZE/2, TILE_RADIUS, lcol, COL_BLACK); - } else if (ds_flags & DF_IMPOSSIBLE) { - int rlen = TILE_SIZE / 4; - draw_rect(dr, dx + TILE_SIZE/2 - rlen/2, dy + TILE_SIZE/2 - rlen/2, - rlen, rlen, COL_BLACK); + } else if ((ds_flags & DF_IMPOSSIBLE)) { + static int draw_blobs_when_lit = -1; + if (draw_blobs_when_lit < 0) { + char *env = getenv("LIGHTUP_LIT_BLOBS"); + draw_blobs_when_lit = (!env || (env[0] == 'y' || + env[0] == 'Y')); + } + if (!(ds_flags & DF_LIT) || draw_blobs_when_lit) { + int rlen = TILE_SIZE / 4; + draw_rect(dr, dx + TILE_SIZE/2 - rlen/2, + dy + TILE_SIZE/2 - rlen/2, + rlen, rlen, COL_BLACK); + } } }