diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-05-14 22:55:05 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-05-14 22:55:05 +0000 |
commit | 2d446fef067a8fbf86343160df3799870d65aa6a (patch) | |
tree | 15edae3baf50a3f66f4e4b2407e61f4845d640fb /apps/main_menu.c | |
parent | c431e227367d18b6b487b7f72aab2653c529450f (diff) | |
download | rockbox-2d446fef067a8fbf86343160df3799870d65aa6a.tar.gz rockbox-2d446fef067a8fbf86343160df3799870d65aa6a.zip |
Fixed lcd_bitmap() to use the bitmap format generated by bmp2rb correctly. Now it works for height > 8. Adapted font transposing & changed some other places to take advantage of that. bounce.c was (apart from fonts) the only routine that used the old format correctly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4620 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main_menu.c')
-rw-r--r-- | apps/main_menu.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index 60c56b6545..cdf8c575e3 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -65,18 +65,11 @@ int show_logo( void ) | |||
65 | { | 65 | { |
66 | #ifdef HAVE_LCD_BITMAP | 66 | #ifdef HAVE_LCD_BITMAP |
67 | char version[32]; | 67 | char version[32]; |
68 | unsigned char *ptr=rockbox112x37; | 68 | int font_h, font_w; |
69 | int height, i, font_h, font_w; | ||
70 | 69 | ||
71 | lcd_clear_display(); | 70 | lcd_clear_display(); |
72 | 71 | ||
73 | for(i=0; i < 37; i+=8) { | 72 | lcd_bitmap(rockbox112x37, 0, 10, 112, 37, false); |
74 | /* the bitmap function doesn't work with full-height bitmaps | ||
75 | so we "stripe" the logo output */ | ||
76 | lcd_bitmap(ptr, 0, 10+i, 112, (37-i)>8?8:37-i, false); | ||
77 | ptr += 112; | ||
78 | } | ||
79 | height = 37; | ||
80 | 73 | ||
81 | #if 0 | 74 | #if 0 |
82 | /* | 75 | /* |
@@ -85,23 +78,15 @@ int show_logo( void ) | |||
85 | * providing logo. | 78 | * providing logo. |
86 | */ | 79 | */ |
87 | unsigned char buffer[112 * 8]; | 80 | unsigned char buffer[112 * 8]; |
88 | int width; | 81 | int width, height; |
89 | |||
90 | int i; | ||
91 | int eline; | ||
92 | 82 | ||
93 | int failure; | 83 | int failure; |
94 | failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer); | 84 | failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer); |
95 | 85 | ||
96 | debugf("read_bmp_file() returned %d, width %d height %d\n", | 86 | debugf("read_bmp_file() returned %d, width %d height %d\n", |
97 | failure, width, height); | 87 | failure, width, height); |
98 | 88 | ||
99 | for(i=0, eline=0; i < height; i+=8, eline++) { | 89 | lcd_bitmap(&buffer, 0, 10, width, height, false); |
100 | /* the bitmap function doesn't work with full-height bitmaps | ||
101 | so we "stripe" the logo output */ | ||
102 | lcd_bitmap(&buffer[eline*width], 0, 10+i, width, | ||
103 | (height-i)>8?8:height-i, false); | ||
104 | } | ||
105 | #endif | 90 | #endif |
106 | 91 | ||
107 | snprintf(version, sizeof(version), "Ver. %s", appsversion); | 92 | snprintf(version, sizeof(version), "Ver. %s", appsversion); |