summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/misc.c
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2024-08-11 23:34:57 -0400
committerFranklin Wei <franklin@rockbox.org>2024-08-16 16:31:28 -0400
commitea0e3704a8aacf87f20ba87e3b33bc4b3966c731 (patch)
tree8db0a329800cffd661f6a80767ce2f956eb57ab8 /apps/plugins/puzzles/src/misc.c
parent903e8c5b32285e50907e6525388162bd459cbef8 (diff)
downloadrockbox-ea0e3704a8aacf87f20ba87e3b33bc4b3966c731.tar.gz
rockbox-ea0e3704a8aacf87f20ba87e3b33bc4b3966c731.zip
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
Diffstat (limited to 'apps/plugins/puzzles/src/misc.c')
-rw-r--r--apps/plugins/puzzles/src/misc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/src/misc.c b/apps/plugins/puzzles/src/misc.c
index f9eaf5d9b8..8e96d67039 100644
--- a/apps/plugins/puzzles/src/misc.c
+++ b/apps/plugins/puzzles/src/misc.c
@@ -351,6 +351,17 @@ void draw_rect_corners(drawing *dr, int cx, int cy, int r, int col)
351 draw_line(dr, cx + r, cy + r, cx + r/2, cy + r, col); 351 draw_line(dr, cx + r, cy + r, cx + r/2, cy + r, col);
352} 352}
353 353
354int compare_integers(const void *av, const void *bv) {
355 const int *a = (const int *)av;
356 const int *b = (const int *)bv;
357 if (*a < *b)
358 return -1;
359 else if (*a > *b)
360 return +1;
361 else
362 return 0;
363}
364
354char *move_cursor(int button, int *x, int *y, int maxw, int maxh, bool wrap, 365char *move_cursor(int button, int *x, int *y, int maxw, int maxh, bool wrap,
355 bool *visible) 366 bool *visible)
356{ 367{