From 2d446fef067a8fbf86343160df3799870d65aa6a Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 14 May 2004 22:55:05 +0000 Subject: 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 --- apps/main_menu.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'apps/main_menu.c') 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 ) { #ifdef HAVE_LCD_BITMAP char version[32]; - unsigned char *ptr=rockbox112x37; - int height, i, font_h, font_w; + int font_h, font_w; lcd_clear_display(); - for(i=0; i < 37; i+=8) { - /* the bitmap function doesn't work with full-height bitmaps - so we "stripe" the logo output */ - lcd_bitmap(ptr, 0, 10+i, 112, (37-i)>8?8:37-i, false); - ptr += 112; - } - height = 37; + lcd_bitmap(rockbox112x37, 0, 10, 112, 37, false); #if 0 /* @@ -85,23 +78,15 @@ int show_logo( void ) * providing logo. */ unsigned char buffer[112 * 8]; - int width; - - int i; - int eline; + int width, height; int failure; failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer); debugf("read_bmp_file() returned %d, width %d height %d\n", failure, width, height); - - for(i=0, eline=0; i < height; i+=8, eline++) { - /* the bitmap function doesn't work with full-height bitmaps - so we "stripe" the logo output */ - lcd_bitmap(&buffer[eline*width], 0, 10+i, width, - (height-i)>8?8:height-i, false); - } + + lcd_bitmap(&buffer, 0, 10, width, height, false); #endif snprintf(version, sizeof(version), "Ver. %s", appsversion); -- cgit v1.2.3