summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/SOURCES1
-rw-r--r--apps/plugins/flipit.c97
-rw-r--r--apps/plugins/logo.c7
-rw-r--r--apps/plugins/viewers.config2
4 files changed, 27 insertions, 80 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 7098c6584f..76be771fb3 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -82,5 +82,4 @@ splitedit.c
82 82
83#ifdef HAVE_REMOTE_LCD 83#ifdef HAVE_REMOTE_LCD
84remotelcd.c 84remotelcd.c
85remotetest.c
86#endif 85#endif
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 8a493044cf..bcd705c16c 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -37,11 +37,11 @@
37 37
38#elif CONFIG_KEYPAD == IRIVER_H100_PAD 38#elif CONFIG_KEYPAD == IRIVER_H100_PAD
39#define FLIPIT_QUIT BUTTON_OFF 39#define FLIPIT_QUIT BUTTON_OFF
40#define FLIPIT_SHUFFLE BUTTON_MODE 40#define FLIPIT_SHUFFLE BUTTON_SELECT
41#define FLIPIT_SOLVE BUTTON_ON 41#define FLIPIT_SOLVE BUTTON_ON
42#define FLIPIT_STEP_BY_STEP BUTTON_REC 42#define FLIPIT_STEP_BY_STEP BUTTON_REC
43#define FLIPIT_TOGGLE_PRE BUTTON_SELECT 43#define FLIPIT_TOGGLE_PRE BUTTON_MODE
44#define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) 44#define FLIPIT_TOGGLE (BUTTON_MODE | BUTTON_REL)
45 45
46#endif 46#endif
47 47
@@ -51,43 +51,6 @@ static int toggle[20];
51static int cursor_pos, moves; 51static int cursor_pos, moves;
52static char s[5]; 52static char s[5];
53static char *ptr; 53static char *ptr;
54
55#if LCD_WIDTH == 160
56#define SPOT_SIZE 20
57#define SPOT_SPACE 4
58#define MARGIN_TOP 16
59#define MARGIN_LEFT 5
60static unsigned char spot_pic[2][60] = {
61 { 0xe0, 0xf8, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
62 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xe0,
63 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
64 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
65 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
66 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, },
67 { 0xe0, 0x18, 0x0c, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
68 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x06, 0x0c, 0x18, 0xe0,
69 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f,
71 0x00, 0x01, 0x03, 0x06, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08,
72 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x03, 0x01, 0x00, }
73};
74
75#define CURSOR_SIZE 22
76static unsigned char cursor_pic[66] = {
77 0x55, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
78 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
79 0x01, 0xaa, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81 0x00, 0x00, 0x00, 0xaa, 0x15, 0x20, 0x00, 0x20, 0x00, 0x20,
82 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
83 0x00, 0x20, 0x00, 0x20, 0x00, 0x2a,
84};
85
86#else
87#define SPOT_SIZE 14
88#define SPOT_SPACE 2
89#define MARGIN_TOP 0
90#define MARGIN_LEFT 0
91static unsigned char spot_pic[2][28] = { 54static unsigned char spot_pic[2][28] = {
92 { 0xe0, 0xf8, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 55 { 0xe0, 0xf8, 0xfc, 0xfe, 0xfe, 0xff, 0xff,
93 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xe0, 56 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xe0,
@@ -98,47 +61,41 @@ static unsigned char spot_pic[2][28] = {
98 0x01, 0x06, 0x08, 0x10, 0x10, 0x20, 0x20, 61 0x01, 0x06, 0x08, 0x10, 0x10, 0x20, 0x20,
99 0x20, 0x20, 0x10, 0x10, 0x08, 0x06, 0x01 } 62 0x20, 0x20, 0x10, 0x10, 0x08, 0x06, 0x01 }
100}; 63};
101
102#define CURSOR_SIZE 16
103static unsigned char cursor_pic[32] = { 64static unsigned char cursor_pic[32] = {
104 0x55, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 65 0x55, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
105 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xaa, 66 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xaa,
106 0x55, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 67 0x55, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80,
107 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xaa }; 68 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xaa };
108#endif 69
109 70
110/* draw a spot at the coordinates (x,y), range of p is 0-19 */ 71/* draw a spot at the coordinates (x,y), range of p is 0-19 */
111static void draw_spot(int p) { 72static void draw_spot(int p) {
112 ptr = spot_pic[spots[p]]; 73 ptr = spot_pic[spots[p]];
113 int x,y;
114 x = (p%5)*(SPOT_SIZE + SPOT_SPACE)+1 + MARGIN_LEFT;
115 y = (p/5)*(SPOT_SIZE + SPOT_SPACE)+1 + MARGIN_TOP;
116 rb->lcd_bitmap (ptr, x, y, SPOT_SIZE, SPOT_SIZE, true);
117/*
118 rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8, true); 74 rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8, true);
119 ptr += 14; 75 ptr += 14;
120 rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6, true); 76 rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6, true);
121*/
122} 77}
123 78
124/* draw the cursor at the current cursor position */ 79/* draw the cursor at the current cursor position */
125static void draw_cursor(void) { 80static void draw_cursor(void) {
126 int i,j; 81 int i,j;
127 i = (cursor_pos%5)*CURSOR_SIZE + (SPOT_SPACE/2)*(cursor_pos%5) + MARGIN_LEFT; 82 i = (cursor_pos%5)*16;
128 j = (cursor_pos/5)*CURSOR_SIZE + (SPOT_SPACE/2)*(cursor_pos/5) + MARGIN_TOP; 83 j = (cursor_pos/5)*16;
129 ptr = cursor_pic; 84 ptr = cursor_pic;
130 rb->lcd_bitmap (ptr, i, j, CURSOR_SIZE, CURSOR_SIZE, false); 85 rb->lcd_bitmap (ptr, i, j, 16, 8, false);
86 ptr += 16;
87 rb->lcd_bitmap (ptr, i, j+8, 16, 8, false);
131} 88}
132 89
133/* clear the cursor where it is */ 90/* clear the cursor where it is */
134static void clear_cursor(void) { 91static void clear_cursor(void) {
135 int i,j; 92 int i,j;
136 i = (cursor_pos%5)*CURSOR_SIZE + (SPOT_SPACE/2)*(cursor_pos%5) + MARGIN_LEFT; 93 i = (cursor_pos%5)*16;
137 j = (cursor_pos/5)*CURSOR_SIZE + (SPOT_SPACE/2)*(cursor_pos/5) + MARGIN_TOP; 94 j = (cursor_pos/5)*16;
138 rb->lcd_clearline(i, j, i+CURSOR_SIZE-1, j); 95 rb->lcd_clearline(i, j, i+15, j);
139 rb->lcd_clearline(i, j+CURSOR_SIZE-1, i+CURSOR_SIZE-1, j+CURSOR_SIZE-1); 96 rb->lcd_clearline(i, j+15, i+15, j+15);
140 rb->lcd_clearline(i, j, i, j+CURSOR_SIZE-1); 97 rb->lcd_clearline(i, j, i, j+15);
141 rb->lcd_clearline(i+CURSOR_SIZE-1, j, i+CURSOR_SIZE-1, j+CURSOR_SIZE-1); 98 rb->lcd_clearline(i+15, j, i+15, j+15);
142} 99}
143 100
144/* check if the puzzle is finished */ 101/* check if the puzzle is finished */
@@ -174,7 +131,7 @@ static void flipit_toggle(void) {
174 } 131 }
175 moves++; 132 moves++;
176 rb->snprintf(s, sizeof(s), "%d", moves); 133 rb->snprintf(s, sizeof(s), "%d", moves);
177 rb->lcd_putsxy(LCD_WIDTH - 27, 20, s); 134 rb->lcd_putsxy(85, 20, s);
178 if (flipit_finished()) 135 if (flipit_finished())
179 clear_cursor(); 136 clear_cursor();
180} 137}
@@ -194,8 +151,8 @@ static void flipit_init(void) {
194 int i; 151 int i;
195 rb->lcd_clear_display(); 152 rb->lcd_clear_display();
196 moves = 0; 153 moves = 0;
197 rb->lcd_drawrect(LCD_WIDTH - 32, 0, 32, LCD_HEIGHT); 154 rb->lcd_drawrect(80, 0, 32, 64);
198 rb->lcd_putsxy(LCD_WIDTH - 31, 10, "Flips"); 155 rb->lcd_putsxy(81, 10, "Flips");
199 for (i=0; i<20; i++) { 156 for (i=0; i<20; i++) {
200 spots[i]=1; 157 spots[i]=1;
201 toggle[i]=1; 158 toggle[i]=1;
@@ -210,11 +167,11 @@ static void flipit_init(void) {
210 cursor_pos = 0; 167 cursor_pos = 0;
211 draw_cursor(); 168 draw_cursor();
212 moves = 0; 169 moves = 0;
213 rb->lcd_clearrect(LCD_WIDTH - 32, 0, 32, LCD_HEIGHT); 170 rb->lcd_clearrect(80, 0, 32, 64);
214 rb->lcd_drawrect(LCD_WIDTH - 32, 0, 32, LCD_HEIGHT); 171 rb->lcd_drawrect(80, 0, 32, 64);
215 rb->lcd_putsxy(LCD_WIDTH - 31, 10, "Flips"); 172 rb->lcd_putsxy(81, 10, "Flips");
216 rb->snprintf(s, sizeof(s), "%d", moves); 173 rb->snprintf(s, sizeof(s), "%d", moves);
217 rb->lcd_putsxy(LCD_WIDTH - 27, 20, s); 174 rb->lcd_putsxy(85, 20, s);
218 rb->lcd_update(); 175 rb->lcd_update();
219} 176}
220 177
@@ -341,19 +298,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
341 rb->lcd_putsxy(2, 28, "[M-LEFT] shuffle"); 298 rb->lcd_putsxy(2, 28, "[M-LEFT] shuffle");
342 rb->lcd_putsxy(2, 38, "[M-UP] solution"); 299 rb->lcd_putsxy(2, 38, "[M-UP] solution");
343 rb->lcd_putsxy(2, 48, "[M-RIGHT] step by step"); 300 rb->lcd_putsxy(2, 48, "[M-RIGHT] step by step");
344#elif CONFIG_KEYPAD == IRIVER_H100_PAD
345 rb->lcd_putsxy(2, 8, "[STOP] to stop");
346 rb->lcd_putsxy(2, 18, "[SELECT] toggle");
347 rb->lcd_putsxy(2, 28, "[MODE] shuffle");
348 rb->lcd_putsxy(2, 38, "[PLAY] solution");
349 rb->lcd_putsxy(2, 48, "[REC] step by step");
350#endif 301#endif
351 rb->lcd_update(); 302 rb->lcd_update();
352 rb->sleep(HZ*3); 303 rb->sleep(HZ*3);
353 304
354 rb->lcd_clear_display(); 305 rb->lcd_clear_display();
355 rb->lcd_drawrect(LCD_WIDTH - 32, 0, 32, LCD_HEIGHT); 306 rb->lcd_drawrect(80, 0, 32, 64);
356 rb->lcd_putsxy(LCD_WIDTH - 31, 10, "Flips"); 307 rb->lcd_putsxy(81, 10, "Flips");
357 for (i=0; i<20; i++) { 308 for (i=0; i<20; i++) {
358 spots[i]=1; 309 spots[i]=1;
359 draw_spot(i); 310 draw_spot(i);
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index acfea234cb..9cace8943c 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -25,8 +25,8 @@
25#define RAND_SCALE 5 25#define RAND_SCALE 5
26 26
27#if defined(IRIVER_H100) && !defined(SIMULATOR) 27#if defined(IRIVER_H100) && !defined(SIMULATOR)
28#define REMOTE_WIDTH LCD_REMOTE_WIDTH 28#define REMOTE_WIDTH 134
29#define REMOTE_HEIGHT LCD_REMOTE_HEIGHT 29#define REMOTE_HEIGHT 65
30#define REMOTE_LOGO_WIDTH 91 30#define REMOTE_LOGO_WIDTH 91
31#define REMOTE_LOGO_HEIGHT 32 31#define REMOTE_LOGO_HEIGHT 32
32#define REMOTE_LOGO rockbox91x32 32#define REMOTE_LOGO rockbox91x32
@@ -191,7 +191,6 @@ const unsigned char rockbox16x7[] = {
191 191
192 192
193enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { 193enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
194 static char debug[30];
195 int button; 194 int button;
196 int timer = 10; 195 int timer = 10;
197 int x = (DISPLAY_WIDTH / 2) - (LOGO_WIDTH / 2); 196 int x = (DISPLAY_WIDTH / 2) - (LOGO_WIDTH / 2);
@@ -227,8 +226,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
227 (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH), 226 (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH),
228 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), 227 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
229 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT, false); 228 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT, false);
230 rb->snprintf(debug, sizeof(debug), "X: %d Y: %d - RX: %d RY: %d", x, y, (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH), (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT));
231 rb->lcd_putsxy(5, DISPLAY_HEIGHT - 10, debug);
232#endif 229#endif
233#else 230#else
234 pgfx_clear_display(); 231 pgfx_clear_display();
diff --git a/apps/plugins/viewers.config b/apps/plugins/viewers.config
index 9106739388..461be862c1 100644
--- a/apps/plugins/viewers.config
+++ b/apps/plugins/viewers.config
@@ -18,4 +18,4 @@ wv,wv2wav.rock, 00 00 00 00 00 00
18m3u,iriverify.rock,00 00 00 00 00 00 18m3u,iriverify.rock,00 00 00 00 00 00
19mpc,mpc2wav.rock, 00 00 00 00 00 00 19mpc,mpc2wav.rock, 00 00 00 00 00 00
20mid,midi2wav.rock, 20 70 70 3F 00 00 20mid,midi2wav.rock, 20 70 70 3F 00 00
21rsp,searchengine.rock, 06 03 5B 5B 0F 06 21rsp,searchengine.rock, 00 00 00 00 00 00