bit. In particular, it now flashes between _two_ specially picked
colours (white and mid-grey), meaning that it should be visible even
if your default background colour is white; and it also flashes
twice rather than once.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6121
cda61777-01e9-0310-a592-
d414129be87e
#define DRAG_THRESHOLD (CIRCLE_RADIUS * 2)
#define PREFERRED_TILESIZE 64
#define DRAG_THRESHOLD (CIRCLE_RADIUS * 2)
#define PREFERRED_TILESIZE 64
-#define FLASH_TIME 0.13F
+#define FLASH_TIME 0.30F
#define ANIM_TIME 0.13F
#define SOLVEANIM_TIME 0.50F
#define ANIM_TIME 0.13F
#define SOLVEANIM_TIME 0.50F
COL_POINT,
COL_DRAGPOINT,
COL_NEIGHBOUR,
COL_POINT,
COL_DRAGPOINT,
COL_NEIGHBOUR,
+ COL_FLASH1,
+ COL_FLASH2,
ret[COL_NEIGHBOUR * 3 + 1] = 0.0F;
ret[COL_NEIGHBOUR * 3 + 2] = 0.0F;
ret[COL_NEIGHBOUR * 3 + 1] = 0.0F;
ret[COL_NEIGHBOUR * 3 + 2] = 0.0F;
+ ret[COL_FLASH1 * 3 + 0] = 0.5F;
+ ret[COL_FLASH1 * 3 + 1] = 0.5F;
+ ret[COL_FLASH1 * 3 + 2] = 0.5F;
+
+ ret[COL_FLASH2 * 3 + 0] = 1.0F;
+ ret[COL_FLASH2 * 3 + 1] = 1.0F;
+ ret[COL_FLASH2 * 3 + 2] = 1.0F;
+
*ncolours = NCOLOURS;
return ret;
}
*ncolours = NCOLOURS;
return ret;
}
* whole thing every time.
*/
* whole thing every time.
*/
- bg = (flashtime != 0 ? COL_DRAGPOINT : COL_BACKGROUND);
+ if (flashtime == 0)
+ bg = COL_BACKGROUND;
+ else if ((int)(flashtime * 4 / FLASH_TIME) % 2 == 0)
+ bg = COL_FLASH1;
+ else
+ bg = COL_FLASH2;
+
game_compute_size(&state->params, ds->tilesize, &w, &h);
draw_rect(fe, 0, 0, w, h, bg);
game_compute_size(&state->params, ds->tilesize, &w, &h);
draw_rect(fe, 0, 0, w, h, bg);