summaryrefslogtreecommitdiff
path: root/apps/plugins/logo.c
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-05-16 12:07:30 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-05-16 12:07:30 +0000
commita7d8829218f1fb7eb27fbcb691badc22e85191fb (patch)
tree6272f6ae649efe96db862c76b3ea8de37c04d39b /apps/plugins/logo.c
parent8f66422f4fb73d256cc8970e87e691142d94c97a (diff)
downloadrockbox-a7d8829218f1fb7eb27fbcb691badc22e85191fb.tar.gz
rockbox-a7d8829218f1fb7eb27fbcb691badc22e85191fb.zip
Remote support on iRiver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6477 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/logo.c')
-rw-r--r--apps/plugins/logo.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 753b28bf1e..080da6a4e5 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -24,6 +24,48 @@
24#define DISPLAY_HEIGHT LCD_HEIGHT 24#define DISPLAY_HEIGHT LCD_HEIGHT
25#define RAND_SCALE 5 25#define RAND_SCALE 5
26 26
27#ifdef IRIVER_H100
28#define REMOTE_WIDTH 134
29#define REMOTE_HEIGHT 65
30#define REMOTE_LOGO_WIDTH 91
31#define REMOTE_LOGO_HEIGHT 32
32#define REMOTE_LOGO rockbox91x32
33/* Smaller logo for the remote */
34const unsigned char rockbox91x32[] = {
35 0x00, 0x02, 0x7f, 0x02, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xf8, 0xf8, 0xf0,
36 0xe0, 0x80, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf0, 0xf8, 0xfa, 0xfa, 0xf4, 0xf4,
37 0xe8, 0x90, 0x60, 0x80, 0x60, 0x90, 0xe8, 0xf4, 0xf4, 0xfa, 0xfa, 0xfa, 0xfa,
38 0xf4, 0xe8, 0x04, 0xf4, 0xf4, 0xf4, 0x04, 0xfe, 0x04, 0xc0, 0xf0, 0xf4, 0xf4,
39 0x34, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
41 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42
43 0x70, 0x88, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0x02, 0xc2, 0x3c, 0xc3, 0xff,
44 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x01, 0x00, 0xfe, 0x02, 0xfd, 0x07,
45 0xff, 0xff, 0xfe, 0x01, 0xfe, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x80, 0x00, 0x01,
46 0x03, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xc0, 0xf9, 0xfe, 0xff, 0xff, 0x07, 0x04,
47 0x04, 0x04, 0xfc, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00,
48 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x40, 0x40,
49 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x00,
50
51 0x00, 0x7c, 0xc3, 0x9e, 0x67, 0x37, 0x8f, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff,
52 0xe3, 0x80, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0x03, 0xc1, 0x3f, 0xc1,
53 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xc1, 0x01, 0x01, 0xff, 0x01, 0x00,
54 0x00, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xcf, 0x3f, 0xff, 0xf8, 0xff, 0x00, 0x00,
55 0x00, 0x00, 0xe0, 0x10, 0x08, 0x18, 0xe8, 0x10, 0xe0, 0x00, 0x01, 0x02, 0x04,
56 0x02, 0x01, 0xe0, 0x10, 0x08, 0x08, 0x18, 0xe8, 0x10, 0xe0, 0x00, 0x01, 0x00,
57 0x00, 0xe0, 0x40, 0x01, 0x02, 0x01, 0x40, 0xe0, 0x18, 0xe4, 0x1b, 0x04, 0x03,
58
59 0x00, 0x00, 0x00, 0x00, 0x77, 0x6e, 0x61, 0x7f, 0x40, 0xff, 0x00, 0x07, 0x1f,
60 0x3f, 0x7f, 0x7c, 0x71, 0xcf, 0x5f, 0x3f, 0x7e, 0x7c, 0x7d, 0x7d, 0x7e, 0x3f,
61 0x1f, 0x0f, 0x01, 0x00, 0x41, 0x47, 0x5f, 0x7f, 0x7e, 0x7c, 0x7f, 0x7c, 0x7e,
62 0x3f, 0x1f, 0x00, 0x7f, 0x7f, 0x7f, 0x01, 0x4e, 0x71, 0xcf, 0x7f, 0x40, 0x40,
63 0x40, 0x40, 0x60, 0x21, 0x42, 0x43, 0x42, 0x41, 0x40, 0x20, 0x10, 0x08, 0x04,
64 0x08, 0x10, 0x20, 0x41, 0x42, 0x42, 0x43, 0x42, 0x41, 0x40, 0x60, 0x50, 0x40,
65 0x40, 0x40, 0x20, 0x50, 0x28, 0x10, 0x20, 0x40, 0x43, 0x44, 0x5b, 0x64, 0x18,
66};
67#endif /* IRIVER_H100 */
68
27#if LCD_WIDTH > 112 69#if LCD_WIDTH > 112
28#define LOGO_WIDTH 112 70#define LOGO_WIDTH 112
29#define LOGO_HEIGHT 37 71#define LOGO_HEIGHT 37
@@ -178,6 +220,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
178#ifdef HAVE_LCD_BITMAP 220#ifdef HAVE_LCD_BITMAP
179 rb->lcd_clear_display(); 221 rb->lcd_clear_display();
180 rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT, false); 222 rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT, false);
223#ifdef REMOTE_LOGO
224 rb->remote_clear_display();
225 rb->remote_bitmap(REMOTE_LOGO,
226 (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH),
227 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
228 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT, false);
229#endif
181#else 230#else
182 pgfx_clear_display(); 231 pgfx_clear_display();
183 pgfx_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT, false); 232 pgfx_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT, false);
@@ -206,6 +255,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
206 255
207#ifdef HAVE_LCD_BITMAP 256#ifdef HAVE_LCD_BITMAP
208 rb->lcd_update(); 257 rb->lcd_update();
258#ifdef REMOTE_LOGO
259 rb->remote_update();
260#endif
209#else 261#else
210 if (cpos != old_cpos) { 262 if (cpos != old_cpos) {
211 rb->lcd_clear_display(); 263 rb->lcd_clear_display();