]> git.draconx.ca Git - rrace.git/blobdiff - src/motif.c
Clear goal overlay when starting a new game.
[rrace.git] / src / motif.c
index 66e31df1a56ad03e5b163450456f3b093ce58c3e..e3ff6c22c587337792b36afc621a49c8511404cf 100644 (file)
@@ -158,16 +158,7 @@ static void do_input_move(struct app_state *state, int x, int y)
 
        if ((mask = game_do_move(&state->board, x, y)) != 0) {
                if (game_check_goal(&state->board) == 0) {
-                       int_fast32_t ms = game_finish(&state->board);
-                       unsigned min, sec;
-
-                       ui_timer_update(state, ms);
-
-                       sec = ms / 1000, ms %= 1000;
-                       min = sec / 60, sec %= 60;
-                       printf("You won!  Time was %u:%.2u.%.3u\n",
-                              min, sec, (unsigned)ms);
-
+                       ui_timer_update(state, game_finish(&state->board));
                        mask |= ~GOAL_MASK;
                }
 
@@ -236,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);