From: simon Date: Sun, 18 Sep 2011 07:43:18 +0000 (+0000) Subject: When we run out of background colours for chains and wrap back to the X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/77dcb2a600afa28bd8a197bf63ff6a0898e59436?hp=8ef49e1d6982dd55a55c27c84806abedc895aeb5 When we run out of background colours for chains and wrap back to the beginning, we should wrap back to COL_B0+1 rather than COL_B0 itself, so as not to reuse white. White should be special, and always indicate a properly numbered square. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9305 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/signpost.c b/signpost.c index 6b16ff7..19649b2 100644 --- a/signpost.c +++ b/signpost.c @@ -1812,8 +1812,8 @@ static int num2col(game_drawstate *ds, int num) { int set = num / (ds->n+1); - if (num <= 0) return COL_B0; - return COL_B0 + (set % 16); + if (num <= 0 || set == 0) return COL_B0; + return COL_B0 + 1 + ((set-1) % 15); } #define ARROW_HALFSZ (7 * TILE_SIZE / 32)