summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sliding_puzzle.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sliding_puzzle.c')
-rw-r--r--apps/plugins/sliding_puzzle.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 7683016066..8c70f6b4a6 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -63,7 +63,7 @@
#define PUZZLE_PICTURE BUTTON_A
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
-(CONFIG_KEYPAD == SANSA_C200_PAD)
+(CONFIG_KEYPAD == SANSA_C200_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_LEFT
#define PUZZLE_RIGHT BUTTON_RIGHT
@@ -312,16 +312,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_PWRALT)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define PUZZLE_QUIT BUTTON_POWER
-#define PUZZLE_LEFT BUTTON_PREV
-#define PUZZLE_RIGHT BUTTON_NEXT
-#define PUZZLE_UP BUTTON_HOME
-#define PUZZLE_DOWN BUTTON_OPTION
-#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
-#define PUZZLE_PICTURE BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_PREV
#define PUZZLE_RIGHT BUTTON_NEXT
@@ -339,7 +330,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_HOME
#define PUZZLE_RIGHT BUTTON_VOL_DOWN
@@ -348,15 +339,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define PUZZLE_QUIT BUTTON_POWER
-#define PUZZLE_LEFT BUTTON_HOME
-#define PUZZLE_RIGHT BUTTON_VOL_DOWN
+#define PUZZLE_LEFT BUTTON_SCROLL_BACK
+#define PUZZLE_RIGHT BUTTON_SCROLL_FWD
#define PUZZLE_UP BUTTON_PREV
#define PUZZLE_DOWN BUTTON_NEXT
-#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
+#define PUZZLE_SHUFFLE BUTTON_BACK
#define PUZZLE_PICTURE BUTTON_PLAY
+
#else
#error No keymap defined!
#endif
@@ -383,13 +375,13 @@ CONFIG_KEYPAD == MROBE500_PAD
#ifndef PUZZLE_PICTURE
#define PUZZLE_PICTURE BUTTON_CENTER
#endif
-#ifndef PUZZLE_QUIT_TEXT
+#ifndef PUZZLE_QUIT_TEXT
#define PUZZLE_QUIT_TEXT "[TOPLEFT]"
#endif
-#ifndef PUZZLE_SHUFFLE_TEXT
+#ifndef PUZZLE_SHUFFLE_TEXT
#define PUZZLE_SHUFFLE_TEXT "[BOTTOMLEFT]"
#endif
-#ifndef PUZZLE_PICTURE_TEXT
+#ifndef PUZZLE_PICTURE_TEXT
#define PUZZLE_PICTURE_TEXT "[CENTER]"
#endif
#endif
@@ -563,7 +555,7 @@ static void draw_spot(int p, int x, int y)
an appropriate hole graphic */
rb->lcd_bitmap_part(sliding_puzzle, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
#else
@@ -580,8 +572,8 @@ static void draw_spot(int p, int x, int y)
{
rb->lcd_bitmap_part( puzzle_bmp_ptr, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
} else {
rb->lcd_drawrect(x, y, SPOTS_WIDTH, SPOTS_HEIGHT);