From: Nick Bowler Date: Fri, 6 Jan 2023 03:46:00 +0000 (-0500) Subject: Clear goal overlay when starting a new game. X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/commitdiff_plain/c11496c3a03550e6103036e09eb27a7bffb7957b Clear goal overlay when starting a new game. While it doesn't crash the game anymore, starting a new game with the goal overlay remaining active nevertheless feels very strange. --- diff --git a/src/curses.c b/src/curses.c index c0f4265..2d9ef64 100644 --- a/src/curses.c +++ b/src/curses.c @@ -422,6 +422,7 @@ void curs_new_game(struct app_state *state) game_reset(&state->board); do_reset_cursor(state); + state->view_goal_on_game = 0; curs_redraw_game(state, -1); curs_redraw_goal(state, -1); update_timer(state, 0); diff --git a/src/motif.c b/src/motif.c index 57e1475..e3ff6c2 100644 --- a/src/motif.c +++ b/src/motif.c @@ -227,6 +227,7 @@ static void proc_new_game(Widget w, XEvent *e, String *argv, Cardinal *argc) game_reset(&state.board); + state.flags &= ~FLAG_VIEW_GOAL_ON_GAME; x11_redraw_goal(&state, -1, get_shell(w)); x11_redraw_game(&state, -1);