summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-10 14:01:05 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-10 14:01:05 +0000
commitbd711ee5becd0493f48095a88ec3e405939ec0f6 (patch)
treec75633026bd8e11152a0e2f5a3cc5d7950709b1a
parentf6a296929e5a66b61967eb82a74c6ffed0af7fae (diff)
downloadrockbox-bd711ee5becd0493f48095a88ec3e405939ec0f6.zip
rockbox-bd711ee5becd0493f48095a88ec3e405939ec0f6.tar.gz
rockbox-bd711ee5becd0493f48095a88ec3e405939ec0f6.tar.bz2
rockbox-bd711ee5becd0493f48095a88ec3e405939ec0f6.tar.xz
Use only internally provided logotype, as we are too early in the init
stage here to use the ATA stuff for loading! The BMP file loading code is still left here for educational purposes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@942 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main_menu.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index 5120235..092efde 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -40,35 +40,38 @@ extern void tetris(void);
int show_logo( void )
{
#ifdef HAVE_LCD_BITMAP
- unsigned char buffer[112 * 8];
char version[32];
+ unsigned char *ptr=rockbox112x37;
+ int height, i, font_h, font_w;
- int failure;
- int height, width, 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;
+
+#if 0
+ /*
+ * This code is not used anymore, but I kept it here since it shows
+ * one way of using the BMP reader function to display an externally
+ * providing logo.
+ */
+ unsigned char buffer[112 * 8];
+ int width;
int i;
int eline;
+ 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);
- lcd_clear_display();
-
- if (failure) {
- unsigned char *ptr=rockbox112x37;
- 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;
-
- }
- else {
-
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 */
@@ -76,6 +79,7 @@ int show_logo( void )
(height-i)>8?8:height-i, false);
}
}
+#endif
snprintf(version, sizeof(version), "Ver. %s", appsversion);
lcd_getfontsize(0, &font_w, &font_h);