From c11496c3a03550e6103036e09eb27a7bffb7957b Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 5 Jan 2023 22:46:00 -0500 Subject: [PATCH] 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. --- src/curses.c | 1 + src/motif.c | 1 + 2 files changed, 2 insertions(+) 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); -- 2.43.2