+/*
+ * Constructs a new set of game bitmaps into buf, with tiles in the
+ * objective area replaced by the goal tile colours, and returns buf.
+ */
+static inline uint_least32_t *
+game_overlay_goal(struct board *board, uint_least32_t *buf)
+{
+ int i;
+
+ for (i = 0; i < 3; i++) {
+ buf[i] = (unsigned long)board->goal[i] << GOAL_SHIFT;
+ buf[i] = (buf[i] & GOAL_MASK) | (board->game[i] & ~GOAL_MASK);
+ }
+
+ return buf;
+}
+