summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/inertia.c
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2024-07-23 06:05:45 -0400
committerFranklin Wei <franklin@rockbox.org>2024-07-23 06:05:45 -0400
commit62b0456a4b1415d3e4138e8dbca4b22f88d374d6 (patch)
tree393620d5f8ac19bddf40aaf90721e792017e1623 /apps/plugins/puzzles/src/inertia.c
parent09aa8de52cb962f1ceebfb1fd44f2c54a924fc5c (diff)
downloadrockbox-62b0456a4b1415d3e4138e8dbca4b22f88d374d6.tar.gz
rockbox-62b0456a4b1415d3e4138e8dbca4b22f88d374d6.zip
puzzles: resync with upstream (adds new Palisade cursor interface).
Resyncs properly with this slightly modified upstream: https://www.franklinwei.com/git/puzzles/commit/?h=rockbox-devel&id=1c62dac3f4f1a819a394ff33cc82912cf9079b50 Change-Id: I2018e81647c22010f9d74d8d14d13982f2969a8f
Diffstat (limited to 'apps/plugins/puzzles/src/inertia.c')
-rw-r--r--apps/plugins/puzzles/src/inertia.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/puzzles/src/inertia.c b/apps/plugins/puzzles/src/inertia.c
index d120411f55..1d5a028add 100644
--- a/apps/plugins/puzzles/src/inertia.c
+++ b/apps/plugins/puzzles/src/inertia.c
@@ -1886,6 +1886,11 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
1886 coords[d*4+2] = x + TILESIZE/2 + (int)((TILESIZE*3/7) * x2); 1886 coords[d*4+2] = x + TILESIZE/2 + (int)((TILESIZE*3/7) * x2);
1887 coords[d*4+3] = y + TILESIZE/2 + (int)((TILESIZE*3/7) * y2); 1887 coords[d*4+3] = y + TILESIZE/2 + (int)((TILESIZE*3/7) * y2);
1888 } 1888 }
1889 /* rockbox hack */
1890 int tmp[2] = { coords[0], coords[1] };
1891 memmove(coords, coords + 2, sizeof(int) * DIRECTIONS * 4 - 2);
1892 memcpy(coords + DIRECTIONS * 4 - 2, tmp, 2 * sizeof(int));
1893
1889 draw_polygon(dr, coords, DIRECTIONS*2, COL_DEAD_PLAYER, COL_OUTLINE); 1894 draw_polygon(dr, coords, DIRECTIONS*2, COL_DEAD_PLAYER, COL_OUTLINE);
1890 } else { 1895 } else {
1891 draw_circle(dr, x + TILESIZE/2, y + TILESIZE/2, 1896 draw_circle(dr, x + TILESIZE/2, y + TILESIZE/2,
@@ -1901,8 +1906,6 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
1901 int coords[14], *c; 1906 int coords[14], *c;
1902 1907
1903 c = coords; 1908 c = coords;
1904 *c++ = ox + px/9;
1905 *c++ = oy + py/9;
1906 *c++ = ox + px/9 + ax*2/3; 1909 *c++ = ox + px/9 + ax*2/3;
1907 *c++ = oy + py/9 + ay*2/3; 1910 *c++ = oy + py/9 + ay*2/3;
1908 *c++ = ox + px/3 + ax*2/3; 1911 *c++ = ox + px/3 + ax*2/3;
@@ -1915,6 +1918,8 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
1915 *c++ = oy - py/9 + ay*2/3; 1918 *c++ = oy - py/9 + ay*2/3;
1916 *c++ = ox - px/9; 1919 *c++ = ox - px/9;
1917 *c++ = oy - py/9; 1920 *c++ = oy - py/9;
1921 *c++ = ox + px/9;
1922 *c++ = oy + py/9;
1918 draw_polygon(dr, coords, 7, COL_HINT, COL_OUTLINE); 1923 draw_polygon(dr, coords, 7, COL_HINT, COL_OUTLINE);
1919 } 1924 }
1920 1925