From 29361abf744ed116cec04ca03e754ddd2794b76c Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 22 Mar 2008 10:24:28 +0000 Subject: Adapt most single-file plugins to the M3 keypad and screen. It's still preliminary, as many plugins now can't be left without the remote. The plugins need to be converted to use the action API (but not pluginlib actions). Plugins are not enabled yet. * Simplify the bitmap handling in the source of some plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16737 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockblox.c | 66 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 21 deletions(-) (limited to 'apps/plugins/rockblox.c') diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index d4d9048797..f0bdd2a510 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -200,6 +200,17 @@ PLUGIN_HEADER #define ROCKBLOX_DROP BUTTON_SELECT #define ROCKBLOX_RESTART BUTTON_DISPLAY +#elif CONFIG_KEYPAD == IAUDIO_M3_PAD + +#define ROCKBLOX_OFF BUTTON_RC_REC +#define ROCKBLOX_ROTATE_RIGHT BUTTON_RC_VOL_DOWN +#define ROCKBLOX_ROTATE_LEFT BUTTON_RC_VOL_UP +#define ROCKBLOX_DOWN BUTTON_RC_MENU +#define ROCKBLOX_LEFT BUTTON_RC_REW +#define ROCKBLOX_RIGHT BUTTON_RC_FF +#define ROCKBLOX_DROP BUTTON_RC_PLAY +#define ROCKBLOX_RESTART BUTTON_RC_MODE + #else #error No keymap defined! #endif @@ -325,6 +336,32 @@ PLUGIN_HEADER #define LEVEL_Y 49 #define LINES_Y 82 +#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) + +#define BLOCK_WIDTH 5 +#define BLOCK_HEIGHT 5 +#define BOARD_X 14 +#define BOARD_Y 0 +#define PREVIEW_X 98 +#define PREVIEW_Y 88 +#define LABEL_X 80 +#define SCORE_Y 15 +#define LEVEL_Y 45 +#define LINES_Y 74 + +#elif (LCD_WIDTH == 132) && (LCD_HEIGHT == 80) + +#define BLOCK_WIDTH 4 +#define BLOCK_HEIGHT 4 +#define BOARD_X 10 +#define BOARD_Y 0 +#define PREVIEW_X 89 +#define PREVIEW_Y 61 +#define LABEL_X 78 +#define SCORE_Y 10 +#define LEVEL_Y 30 +#define LINES_Y 50 + #elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 128) #define BLOCK_WIDTH 6 @@ -338,18 +375,18 @@ PLUGIN_HEADER #define LEVEL_Y 49 #define LINES_Y 82 -#elif (LCD_WIDTH == 132) && (LCD_HEIGHT == 80) +#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 96) #define BLOCK_WIDTH 4 #define BLOCK_HEIGHT 4 -#define BOARD_X 10 -#define BOARD_Y 0 +#define BOARD_X 14 +#define BOARD_Y 2 #define PREVIEW_X 89 -#define PREVIEW_Y 61 -#define LABEL_X 78 -#define SCORE_Y 10 -#define LEVEL_Y 30 -#define LINES_Y 50 +#define PREVIEW_Y 76 +#define LABEL_X 70 +#define SCORE_Y 14 +#define LEVEL_Y 39 +#define LINES_Y 64 #elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 64) @@ -378,19 +415,6 @@ PLUGIN_HEADER #define LEVEL_X 78 #define LINES_Y 51 -#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) - -#define BLOCK_WIDTH 5 -#define BLOCK_HEIGHT 5 -#define BOARD_X 14 -#define BOARD_Y 0 -#define PREVIEW_X 98 -#define PREVIEW_Y 88 -#define LABEL_X 80 -#define SCORE_Y 15 -#define LEVEL_Y 45 -#define LINES_Y 74 - #endif #ifndef LEVEL_X -- cgit v1.2.3