From bd886481b9938d4bfc4811d2b892cf388578b9fe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 May 2002 12:56:43 +0000 Subject: display logo if present git-svn-id: svn://svn.rockbox.org/rockbox/trunk@591 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/menu.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'uisimulator') diff --git a/uisimulator/menu.c b/uisimulator/menu.c index 6a6b61e755..5c8356c93a 100644 --- a/uisimulator/menu.c +++ b/uisimulator/menu.c @@ -117,6 +117,52 @@ void add_menu_item(int location, char *string) menu_bottom = location; } +void show_logo(void) +{ + unsigned char buffer[112 * 8]; + + int failure; + int width=0; + int height=0; + + failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer); + + debugf("read_bmp_file() returned %d, width %d height %d\n", + failure, width, height); + + if(!failure) { + int i; + int eline; + for(i=0, eline=0; i< height; i+=8, eline++) { + int x,y; + + /* the bitmap function doesn't work with full-height bitmaps + so we "stripe" the logo output */ + + lcd_bitmap(&buffer[eline*width], 0, 24+i, width, + (height-i)>8?8:height-i, false); + +#if 0 + /* for screen output debugging */ + for(y=0; y<8 && (i+y < height); y++) { + for(x=0; x < width; x++) { + + if(buffer[eline*width + x] & (1<