From 62b0456a4b1415d3e4138e8dbca4b22f88d374d6 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 23 Jul 2024 06:05:45 -0400 Subject: 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 --- apps/plugins/puzzles/src/inertia.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 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, 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, @@ -1901,8 +1906,6 @@ 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; @@ -1915,6 +1918,8 @@ 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