X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/b8d5c7bc17fcb037c23d323d4f8fbdbab9894d9d..a70b0ef8bf7cb26cc779e9b2da480295f5ebf2bd:/src/x11.c diff --git a/src/x11.c b/src/x11.c index c8ef335..b4b0a2c 100644 --- a/src/x11.c +++ b/src/x11.c @@ -281,13 +281,8 @@ void x11_redraw_game(struct app_state *state, uint_fast32_t mask) unsigned sz = state->game_tile_sz; int i; - if (state->flags & FLAG_VIEW_GOAL_ON_GAME) { - for (i = 0; i < 3; i++) { - buf[i] = state->board.goal[i]; - buf[i] = (gp[i] & ~GOAL_MASK) | (buf[i] << GOAL_SHIFT); - } - gp = buf; - } + if (state->flags & FLAG_VIEW_GOAL_ON_GAME) + gp = game_overlay_goal(&state->board, buf); /* Optimize the game end case where the outer frame is cleared */ if (mask & GAME_MASK & ~GOAL_MASK) {