diff options
| author | Franklin Wei <me@fwei.tk> | 2017-07-13 16:54:00 -0400 |
|---|---|---|
| committer | Franklin Wei <franklin@rockbox.org> | 2024-08-08 23:16:29 -0400 |
| commit | ee5e3270efa37aeb78ecd9f81af800cfb4894d90 (patch) | |
| tree | 8388f65def6f20eee27f3f025feff79be65d6cc4 /signpost.c | |
| parent | beb0345017f2b083947d18f164c4dd8c4a521dbf (diff) | |
| download | puzzles-rockbox-devel.zip puzzles-rockbox-devel.tar.gz puzzles-rockbox-devel.tar.bz2 puzzles-rockbox-devel.tar.xz | |
Signpost: fix star drawing on rockboxrockbox-devel
Diffstat (limited to 'signpost.c')
| -rw-r--r-- | signpost.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1895,8 +1895,9 @@ static void draw_star(drawing *dr, int cx, int cy, int rad, int npoints, coords = snewn(npoints * 2 * 2, int); for (n = 0; n < npoints * 2; n++) { - a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset; - r = (n % 2) ? (double)rad/2.0 : (double)rad; + /* hack to accomodate rockbox's concave polygon drawing */ + a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset - PI / npoints; + r = (n % 2 == 0) ? (double)rad/2.0 : (double)rad; /* We're rotating the point at (0, -r) by a degrees */ coords[2*n+0] = cx + (int)( r * sin(a)); |