From 2579ed6b432c64ae0732342cebd83fde88492eee Mon Sep 17 00:00:00 2001 From: Jeffitus <49927060+Jeffitus@users.noreply.github.com> Date: Fri, 17 Apr 2020 15:47:22 -0500 Subject: [PATCH] Some minor optimizations for 1.0 release --- src/drawing.c | 1 - src/game.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/drawing.c b/src/drawing.c index c7c8b0a..6de60b5 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -64,7 +64,6 @@ bool draw_puzzle(void) { } } - gfx_BlitBuffer(); return puzzle_filled; } diff --git a/src/game.c b/src/game.c index 89ed48c..1912243 100644 --- a/src/game.c +++ b/src/game.c @@ -333,12 +333,15 @@ void reveal_solution(void) { for (i = 0; i < 9; i++) { for (j = 0; j < 9; j++) { - puzzle[i][j] |= SOLUTION(puzzle[i][j] & SOLUTION_DATA); + if (puzzle[i][j] & UNDEFINED) { + puzzle[i][j] = SOLUTION(puzzle[i][j] & SOLUTION_DATA) | UNDEFINED; + } } } draw_grid(); draw_puzzle(); + gfx_BlitBuffer(); wait_for_key_press(); wait_for_key_release(); } \ No newline at end of file