chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f89199
)
When we run out of background colours for chains and wrap back to the
author
Simon Tatham
<anakin@pobox.com>
Sun, 18 Sep 2011 07:43:18 +0000
(07:43 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Sun, 18 Sep 2011 07:43:18 +0000
(07:43 +0000)
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.
[originally from svn r9305]
signpost.c
patch
|
blob
|
history
diff --git
a/signpost.c
b/signpost.c
index 6b16ff776596006d79ededc19a667a254661ab3f..19649b2a390268a9cf674973c4c56141f2f40b5e 100644
(file)
--- 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)