aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-08-31 17:34:47 +0000
committerSimon Tatham <anakin@pobox.com>2005-08-31 17:34:47 +0000
commitc70312f8a82fbf0bcd441237be151ddab0483a48 (patch)
treeba43a416e4045ab458db77ec0c7f4e9f12ec7029 /map.c
parent7b082219529280ac319f8b772f69a41f47992cde (diff)
downloadpuzzles-c70312f8a82fbf0bcd441237be151ddab0483a48.zip
puzzles-c70312f8a82fbf0bcd441237be151ddab0483a48.tar.gz
puzzles-c70312f8a82fbf0bcd441237be151ddab0483a48.tar.bz2
puzzles-c70312f8a82fbf0bcd441237be151ddab0483a48.tar.xz
Terribly cunning approach to making the pencil marks look nicer,
thanks to Gareth. [originally from svn r6248]
Diffstat (limited to '')
-rw-r--r--map.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/map.c b/map.c
index 2727165..0a41f78 100644
--- a/map.c
+++ b/map.c
@@ -7,7 +7,6 @@
*
* - clue marking
* - better four-colouring algorithm?
- * - can we make the pencil marks look nicer?
* - ability to drag a set of pencil marks?
*/
@@ -2635,7 +2634,9 @@ static void draw_square(drawing *dr, game_drawstate *ds,
xo < 2 ? LE : RE);
ee = map->map[e * wh + y*w+x];
- c = (yo & 1) * 2 + (xo & 1);
+ if (xo != (yo * 2 + 1) % 5)
+ continue;
+ c = yo;
if (!(pencil & ((ee == te ? PENCIL_T_BASE : PENCIL_B_BASE) << c)))
continue;
@@ -2647,9 +2648,9 @@ static void draw_square(drawing *dr, game_drawstate *ds,
(map->map[TE * wh + y*w+x] != map->map[RE * wh + y*w+x]))
continue; /* avoid BL-TR diagonal line */
- draw_rect(dr, COORD(x) + (5*xo+1)*TILESIZE/20,
- COORD(y) + (5*yo+1)*TILESIZE/20,
- 4*TILESIZE/20, 4*TILESIZE/20, COL_0 + c);
+ draw_circle(dr, COORD(x) + (xo+1)*TILESIZE/5,
+ COORD(y) + (yo+1)*TILESIZE/5,
+ TILESIZE/8, COL_0 + c, COL_0 + c);
}
/*