Move USB logo to an external (native-depth) bitmap.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11137 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2006-10-06 08:37:22 +00:00
parent a9a5c3584b
commit da2bf53230
9 changed files with 21 additions and 43 deletions

View file

@ -21,7 +21,7 @@ DEPFILE = $(OBJDIR)/dep-bitmaps-mono
BMP2RB = $(BMP2RB_MONO)
OUTPUT = $(BUILDDIR)/libbitmapsmono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc

View file

@ -21,4 +21,6 @@ rockboxlogo.240x74x16.bmp
rockboxlogo.320x98x16.bmp
#endif
usblogo.100x32x1.bmp
#endif /* HAVE_LCD_BITMAP */

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

View file

@ -21,7 +21,7 @@ DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono
BMP2RB = $(BMP2RB_REMOTEMONO)
OUTPUT = $(BUILDDIR)/libbitmapsremotemono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc

View file

@ -6,4 +6,6 @@ remote_rockboxlogo.128x42x1.bmp
remote_rockboxlogo.128x42x2.bmp
#endif
remote_usblogo.100x32x1.bmp
#endif /* HAVE_REMOTE_LCD */

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

View file

@ -20,48 +20,17 @@
#include "logo.h"
#ifdef HAVE_LCD_BITMAP
#define BMPHEIGHT_usb_logo_main 32
#define BMPWIDTH_usb_logo_main 100
static const unsigned char usb_logo_main[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08,
0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0,
0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0,
0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c,
0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01,
0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f,
0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3,
0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02,
0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0,
0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00,
};
#include <bitmaps/usblogo.h>
#if NB_SCREENS==2
#include <bitmaps/remote_usblogo.h>
#endif
struct logo usb_logos[]=
{
[SCREEN_MAIN]={usb_logo_main, BMPWIDTH_usb_logo_main, BMPHEIGHT_usb_logo_main},
[SCREEN_MAIN]={usblogo, BMPWIDTH_usblogo, BMPHEIGHT_usblogo},
#if NB_SCREENS==2
[SCREEN_REMOTE]={usb_logo_main, BMPWIDTH_usb_logo_main, BMPHEIGHT_usb_logo_main}
[SCREEN_REMOTE]={remote_usblogo, BMPWIDTH_remote_usblogo, BMPHEIGHT_remote_usblogo}
#endif
};
@ -78,7 +47,7 @@ void gui_logo_draw(struct logo * logo, struct screen * display)
#ifdef HAVE_LCD_BITMAP
/* Center bitmap on screen */
display->mono_bitmap(logo->bitmap,
display->bitmap(logo->bitmap,
display->width/2-logo->width/2,
display->height/2-logo->height/2,
logo->width,

View file

@ -23,7 +23,7 @@
struct logo{
#ifdef HAVE_LCD_BITMAP
const unsigned char * bitmap;
const fb_data* bitmap;
int width;
int height;
#else

View file

@ -54,7 +54,12 @@ void screen_init(struct screen * screen, enum screen_type screen_type)
screen->mono_bitmap=&lcd_remote_mono_bitmap;
screen->mono_bitmap_part=&lcd_remote_mono_bitmap_part;
screen->set_drawmode=&lcd_remote_set_drawmode;
#if LCD_REMOTE_DEPTH > 1
#if LCD_REMOTE_DEPTH == 1
screen->bitmap=&lcd_remote_mono_bitmap;
screen->bitmap_part=&lcd_remote_mono_bitmap_part;
#else
screen->bitmap=&lcd_remote_bitmap;
screen->bitmap_part=&lcd_remote_bitmap_part;
screen->get_background=&lcd_remote_get_background;
screen->get_foreground=&lcd_remote_get_foreground;
screen->set_background=&lcd_remote_set_background;