diff options
author | Franklin Wei <franklin@rockbox.org> | 2024-08-11 23:34:57 -0400 |
---|---|---|
committer | Franklin Wei <franklin@rockbox.org> | 2024-08-16 16:31:28 -0400 |
commit | ea0e3704a8aacf87f20ba87e3b33bc4b3966c731 (patch) | |
tree | 8db0a329800cffd661f6a80767ce2f956eb57ab8 /apps/plugins/puzzles/src/signpost.c | |
parent | 903e8c5b32285e50907e6525388162bd459cbef8 (diff) | |
download | rockbox-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/signpost.c')
-rw-r--r-- | apps/plugins/puzzles/src/signpost.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/plugins/puzzles/src/signpost.c b/apps/plugins/puzzles/src/signpost.c index 4d2f5849fd..9aed67bb4a 100644 --- a/apps/plugins/puzzles/src/signpost.c +++ b/apps/plugins/puzzles/src/signpost.c | |||
@@ -1895,9 +1895,8 @@ static void draw_star(drawing *dr, int cx, int cy, int rad, int npoints, | |||
1895 | coords = snewn(npoints * 2 * 2, int); | 1895 | coords = snewn(npoints * 2 * 2, int); |
1896 | 1896 | ||
1897 | for (n = 0; n < npoints * 2; n++) { | 1897 | for (n = 0; n < npoints * 2; n++) { |
1898 | /* hack to accomodate rockbox's concave polygon drawing */ | 1898 | a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset; |
1899 | a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset - PI / npoints; | 1899 | r = (n % 2) ? (double)rad/2.0 : (double)rad; |
1900 | r = (n % 2 == 0) ? (double)rad/2.0 : (double)rad; | ||
1901 | 1900 | ||
1902 | /* We're rotating the point at (0, -r) by a degrees */ | 1901 | /* We're rotating the point at (0, -r) by a degrees */ |
1903 | coords[2*n+0] = cx + (int)( r * sin(a)); | 1902 | coords[2*n+0] = cx + (int)( r * sin(a)); |