mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Terribly cunning approach to making the pencil marks look nicer,
thanks to Gareth. [originally from svn r6248]
This commit is contained in:
11
map.c
11
map.c
@ -7,7 +7,6 @@
|
|||||||
*
|
*
|
||||||
* - clue marking
|
* - clue marking
|
||||||
* - better four-colouring algorithm?
|
* - better four-colouring algorithm?
|
||||||
* - can we make the pencil marks look nicer?
|
|
||||||
* - ability to drag a set of pencil marks?
|
* - 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);
|
xo < 2 ? LE : RE);
|
||||||
ee = map->map[e * wh + y*w+x];
|
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)))
|
if (!(pencil & ((ee == te ? PENCIL_T_BASE : PENCIL_B_BASE) << c)))
|
||||||
continue;
|
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]))
|
(map->map[TE * wh + y*w+x] != map->map[RE * wh + y*w+x]))
|
||||||
continue; /* avoid BL-TR diagonal line */
|
continue; /* avoid BL-TR diagonal line */
|
||||||
|
|
||||||
draw_rect(dr, COORD(x) + (5*xo+1)*TILESIZE/20,
|
draw_circle(dr, COORD(x) + (xo+1)*TILESIZE/5,
|
||||||
COORD(y) + (5*yo+1)*TILESIZE/20,
|
COORD(y) + (yo+1)*TILESIZE/5,
|
||||||
4*TILESIZE/20, 4*TILESIZE/20, COL_0 + c);
|
TILESIZE/8, COL_0 + c, COL_0 + c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user