X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/b8d5c7bc17fcb037c23d323d4f8fbdbab9894d9d..a70b0ef8bf7cb26cc779e9b2da480295f5ebf2bd:/src/curses.c?ds=inline diff --git a/src/curses.c b/src/curses.c index f66589e..c0f4265 100644 --- a/src/curses.c +++ b/src/curses.c @@ -1,6 +1,6 @@ /* * Curses UI for slide puzzle game - * Copyright © 2022 Nick Bowler + * Copyright © 2022-2023 Nick Bowler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -156,13 +156,8 @@ static void curs_redraw_game(struct app_state *state, uint_fast32_t mask) if (mask == -1) redraw_area_border(state->gamewin, 2, 5); - if (state->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->view_goal_on_game) + gp = game_overlay_goal(&state->board, buf); for (i = 0; i < 25; i++) { if (mask & 1) {