diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-07-06 22:58:02 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-07-06 22:58:02 +0000 |
| commit | f894a4c2691fbde1758a05407cb5eadcaec4a6c8 (patch) | |
| tree | 46cb7ce63c794020175ab251cf0299663be8bf3c /apps/screens.c | |
| parent | 1076eb1d2720b88757616f642be0c39c6a3b76df (diff) | |
| download | rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.zip rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.gz rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.bz2 rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.xz | |
4-shades greyscale graphics core for iriver H1x0. 4-grey rockbox logo and light grey background in splash() boxes. Simplified the splash() box creation as the new graphics core does clipping. Adapted screendump feature and added flexible preprocessing to construct the bmp header. Rockboy now uses 4-grey mode as well. 4-grey support for win32 simulator. Fixed win32 player sim to not use double bitmap conversion via a recorder-like framebuffer, and correctly display double-height text. X11 simulator temporarily adapted. The display won't be distorted, but it still shows b&w only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7046 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screens.c')
| -rw-r--r-- | apps/screens.c | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/apps/screens.c b/apps/screens.c index 8c90f02..494acd7 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -95,9 +95,9 @@ void usb_display_info(void) #ifdef HAVE_LCD_BITMAP /* Center bitmap on screen */ - lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, - LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, - BMPHEIGHT_usb_logo); + lcd_mono_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, + LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, + BMPHEIGHT_usb_logo); status_draw(true); lcd_update(); #else @@ -234,15 +234,15 @@ void charging_display_info(bool animate) if (!animate) { /* draw the outline */ /* middle part */ - lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); + lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); lcd_set_drawmode(DRMODE_FG); /* upper line */ charging_logo[0] = charging_logo[1] = 0x00; memset(charging_logo+2, 0x80, 34); - lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8); + lcd_mono_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8); /* lower line */ memset(charging_logo+2, 0x01, 34); - lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8); + lcd_mono_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8); lcd_set_drawmode(DRMODE_SOLID); } else @@ -258,7 +258,7 @@ void charging_display_info(bool animate) charging_logo[i] = 0x01 << bitpos; } } - lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); + lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); phase++; } lcd_update(); @@ -415,8 +415,8 @@ int pitch_screen(void) ptr = str(LANG_PITCH_UP); lcd_getstringsize(ptr,&w,&h); lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr); - lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow], - LCD_WIDTH/2 - 3, h*2, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_UpArrow], + LCD_WIDTH/2 - 3, h*2, 7, 8); snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 ); lcd_getstringsize(buf,&w,&h); @@ -425,14 +425,14 @@ int pitch_screen(void) ptr = str(LANG_PITCH_DOWN); lcd_getstringsize(ptr,&w,&h); lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); - lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], - LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], + LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); ptr = str(LANG_PAUSE); lcd_getstringsize(ptr,&w,&h); lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr); - lcd_bitmap(bitmap_icons_7x8[Icon_Pause], - (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_Pause], + (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8); lcd_update(); } @@ -637,12 +637,12 @@ bool quick_screen(int context, int button) #endif } - lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], - LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); - lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], - LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); - lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], - LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], + LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], + LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); + lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward], + LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); lcd_update(); key = button_get(true); @@ -862,24 +862,18 @@ void splash(int ticks, /* how long the splash is displayed */ } #ifdef HAVE_LCD_BITMAP - /* If we center the display and it wouldn't cover the full screen, - then just clear the box we need and put a nice little frame and - put the text in there! */ + /* If we center the display, then just clear the box we need and put + a nice little frame and put the text in there! */ if(center && (y > 2)) { - if(maxw < (LCD_WIDTH -4)) { - int xx = (LCD_WIDTH-maxw)/2 - 2; - lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); - lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); - lcd_set_drawmode(DRMODE_SOLID); - lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); - } - else { - lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); - lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4); - lcd_set_drawmode(DRMODE_SOLID); - lcd_hline(0, LCD_WIDTH-1, y-2); - lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-y+2); - } + int xx = (LCD_WIDTH-maxw)/2 - 2; + /* The new graphics routines handle clipping, so no need to check */ +#if LCD_DEPTH > 1 + lcd_set_background(MAX_LEVEL-1); +#endif + lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); + lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); + lcd_set_drawmode(DRMODE_SOLID); + lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); } else #endif @@ -921,6 +915,9 @@ void splash(int ticks, /* how long the splash is displayed */ x += w+SPACE; /* pixels space! */ next = strtok_r(NULL, " ", &store); } +#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) + lcd_set_background(MAX_LEVEL); +#endif lcd_update(); if(ticks) |