Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Logo Bitmap Size

Re: Logo Bitmap Size

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 5 Jan 2003 20:41:34 +0100 (MET)

On Sun, 5 Jan 2003 for_spam_at_gmx.de wrote:

> In main_menu.c we had:
>
> int show_logo( void )
> {
> #ifdef HAVE_LCD_BITMAP
> char version[32];
> unsigned char *ptr=rockbox112x37;
> int height, i, 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;
>
> Wondered a little bit about that and replaced 37 with 64 (height of
> display):

The Rockbox logo is 37 pixels high, that's why.

> #ifdef HAVE_LCD_BITMAP
> char version[32];
> unsigned char *ptr=rockbox112x37;
> int height, i, font_h, font_w;
>
> lcd_clear_display();
>
> for(i=0; i <= 64; i+=8) {
> lcd_bitmap(ptr, 0, i, 112, (64-i)>8?8:64-i, false);
> ptr += 112;
> }
> height = 64;
>
> Works fine with my recorder. ( replaced rockbox137x37 with custom logo -
> see http://rockbox.my-vserver.de/micromusic_archos_jb20rec.jpg )

That would not be nice if your logo is smaller than 64 pixels.

> Was there a bug in lcd_bitmap() which has been solved without show_logo()
> being modified, too ?

Uh, like what bug do you mean?

> What about show_logo( unsigned char *ptr ) ? This will add flexibility to
> this routine. One could do a show_logo(this_logo),
> show_logo(that_logo)..... then.

You'd need to pass in the width and height too, but sure, that could easily
be done.

-- 
 Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/
Received on 2003-01-05

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy