+ anim ? COL_BACKGROUND : tile & 1 ? COL_WRONG : COL_RIGHT);
+ if (anim) {
+ /*
+ * Draw a polygon indicating that the square is diagonally
+ * flipping over.
+ */
+ int coords[8], colour;
+
+ coords[0] = bx + TILE_SIZE;
+ coords[1] = by;
+ coords[2] = bx + TILE_SIZE * animtime;
+ coords[3] = by + TILE_SIZE * animtime;
+ coords[4] = bx;
+ coords[5] = by + TILE_SIZE;
+ coords[6] = bx + TILE_SIZE - TILE_SIZE * animtime;
+ coords[7] = by + TILE_SIZE - TILE_SIZE * animtime;
+
+ colour = (tile & 1 ? COL_WRONG : COL_RIGHT);
+ if (animtime < 0.5)
+ colour = COL_WRONG + COL_RIGHT - colour;
+
+ draw_polygon(fe, coords, 4, TRUE, colour);
+ draw_polygon(fe, coords, 4, FALSE, COL_GRID);
+ }