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/inertia.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'apps/plugins/puzzles/src/inertia.c') diff --git a/apps/plugins/puzzles/src/inertia.c b/apps/plugins/puzzles/src/inertia.c index 1d5a028add..fe174f3b56 100644 --- a/apps/plugins/puzzles/src/inertia.c +++ b/apps/plugins/puzzles/src/inertia.c @@ -722,18 +722,6 @@ static int move_goes_to(int w, int h, char *grid, int x, int y, int d) return (y*w+x)*DP1+dr; } -static int compare_integers(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) { @@ -1886,11 +1874,6 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y, coords[d*4+2] = x + TILESIZE/2 + (int)((TILESIZE*3/7) * x2); coords[d*4+3] = y + TILESIZE/2 + (int)((TILESIZE*3/7) * y2); } - /* rockbox hack */ - int tmp[2] = { coords[0], coords[1] }; - memmove(coords, coords + 2, sizeof(int) * DIRECTIONS * 4 - 2); - memcpy(coords + DIRECTIONS * 4 - 2, tmp, 2 * sizeof(int)); - draw_polygon(dr, coords, DIRECTIONS*2, COL_DEAD_PLAYER, COL_OUTLINE); } else { draw_circle(dr, x + TILESIZE/2, y + TILESIZE/2, @@ -1906,6 +1889,8 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y, int coords[14], *c; c = coords; + *c++ = ox + px/9; + *c++ = oy + py/9; *c++ = ox + px/9 + ax*2/3; *c++ = oy + py/9 + ay*2/3; *c++ = ox + px/3 + ax*2/3; @@ -1918,8 +1903,6 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y, *c++ = oy - py/9 + ay*2/3; *c++ = ox - px/9; *c++ = oy - py/9; - *c++ = ox + px/9; - *c++ = oy + py/9; draw_polygon(dr, coords, 7, COL_HINT, COL_OUTLINE); } -- cgit v1.2.3