I've been pondering whether to do this for months: turn the rather

washed-out yellow and green in Guess into their full-brightness pure
forms. This makes them hard to see against some backgrounds, so I'm
also surrounding all coloured pegs with black outlines. Looks a
little cartoony, but I think it's an overall improvement on the
previous look.

[originally from svn r6589]
This commit is contained in:
Simon Tatham
2006-03-02 19:39:46 +00:00
parent fe514e9374
commit a8fd3a1b17

21
guess.c
View File

@ -876,14 +876,14 @@ static float *game_colours(frontend *fe, int *ncolours)
ret[COL_1 * 3 + 1] = 0.0F; ret[COL_1 * 3 + 1] = 0.0F;
ret[COL_1 * 3 + 2] = 0.0F; ret[COL_1 * 3 + 2] = 0.0F;
/* yellow (toned down a bit due to pale grey background) */ /* yellow */
ret[COL_2 * 3 + 0] = 0.7F; ret[COL_2 * 3 + 0] = 1.0F;
ret[COL_2 * 3 + 1] = 0.7F; ret[COL_2 * 3 + 1] = 1.0F;
ret[COL_2 * 3 + 2] = 0.0F; ret[COL_2 * 3 + 2] = 0.0F;
/* green (also toned down) */ /* green */
ret[COL_3 * 3 + 0] = 0.0F; ret[COL_3 * 3 + 0] = 0.0F;
ret[COL_3 * 3 + 1] = 0.5F; ret[COL_3 * 3 + 1] = 1.0F;
ret[COL_3 * 3 + 2] = 0.0F; ret[COL_3 * 3 + 2] = 0.0F;
/* blue */ /* blue */
@ -912,9 +912,9 @@ static float *game_colours(frontend *fe, int *ncolours)
ret[COL_8 * 3 + 2] = 1.0F; ret[COL_8 * 3 + 2] = 1.0F;
/* light green */ /* light green */
ret[COL_9 * 3 + 0] = 0.5F; ret[COL_9 * 3 + 0] = 0.7F;
ret[COL_9 * 3 + 1] = 0.8F; ret[COL_9 * 3 + 1] = 1.0F;
ret[COL_9 * 3 + 2] = 0.5F; ret[COL_9 * 3 + 2] = 0.7F;
/* pink */ /* pink */
ret[COL_10 * 3 + 0] = 1.0F; ret[COL_10 * 3 + 0] = 1.0F;
@ -1022,7 +1022,7 @@ static void draw_peg(drawing *dr, game_drawstate *ds, int cx, int cy,
COL_BACKGROUND); COL_BACKGROUND);
if (PEGRAD > 0) { if (PEGRAD > 0) {
draw_circle(dr, cx+PEGRAD, cy+PEGRAD, PEGRAD, draw_circle(dr, cx+PEGRAD, cy+PEGRAD, PEGRAD,
COL_EMPTY + col, COL_EMPTY + col); COL_EMPTY + col, (col ? COL_FRAME : COL_EMPTY));
} else } else
draw_rect(dr, cx, cy, PEGSZ, PEGSZ, COL_EMPTY + col); draw_rect(dr, cx, cy, PEGSZ, PEGSZ, COL_EMPTY + col);
draw_update(dr, cx-CGAP, cy-CGAP, PEGSZ+CGAP*2, PEGSZ+CGAP*2); draw_update(dr, cx-CGAP, cy-CGAP, PEGSZ+CGAP*2, PEGSZ+CGAP*2);
@ -1129,7 +1129,8 @@ static void hint_redraw(drawing *dr, game_drawstate *ds, int guess,
rowy += HINTOFF; rowy += HINTOFF;
} }
if (HINTRAD > 0) { if (HINTRAD > 0) {
draw_circle(dr, rowx+HINTRAD, rowy+HINTRAD, HINTRAD, col, col); draw_circle(dr, rowx+HINTRAD, rowy+HINTRAD, HINTRAD, col,
(col == emptycol ? emptycol : COL_FRAME));
} else { } else {
draw_rect(dr, rowx, rowy, HINTSZ, HINTSZ, col); draw_rect(dr, rowx, rowy, HINTSZ, HINTSZ, col);
} }