From ea0e3704a8aacf87f20ba87e3b33bc4b3966c731 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 11 Aug 2024 23:34:57 -0400 Subject: puzzles: resync with upstream 262f709. This is the first resync with a fully unmodified upstream repo. This includes a new scanline polygon renderer in the upstream puzzles distribution. This allows us to get rid of the monstrosity of a polygon renderer we had been shipping in rockbox.c. Change-Id: I23628c74bb5ff7a9e7932bf16d68a1c867c49969 --- apps/plugins/puzzles/src/twiddle.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'apps/plugins/puzzles/src/twiddle.c') diff --git a/apps/plugins/puzzles/src/twiddle.c b/apps/plugins/puzzles/src/twiddle.c index b3aa06f1d5..49d8db7825 100644 --- a/apps/plugins/puzzles/src/twiddle.c +++ b/apps/plugins/puzzles/src/twiddle.c @@ -532,18 +532,6 @@ static void free_game(game_state *state) sfree(state); } -static int compare_int(const void *av, const void *bv) -{ - const int *a = (const int *)av; - const int *b = (const int *)bv; - if (*a < *b) - return -1; - else if (*a > *b) - return +1; - else - return 0; -} - static char *solve_game(const game_state *state, const game_state *currstate, const char *aux, const char **error) { @@ -758,7 +746,7 @@ static game_state *execute_move(const game_state *from, const char *move) * conveniently being able to get hold of a clean state from * which to practise manoeuvres. */ - qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_int); + qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_integers); for (i = 0; i < ret->w*ret->h; i++) ret->grid[i] &= ~3; ret->used_solve = true; -- cgit v1.2.3