1
0
Fork 0
forked from len0rd/rockbox

simulator:

- correct colours for m:robe 100 display & screendump
- labelled button on background 

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16488 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Kukla 2008-03-02 21:28:26 +00:00
parent 793fc3f072
commit 3e3e1d518e
6 changed files with 44 additions and 20 deletions

View file

@ -393,8 +393,13 @@ static const unsigned char bmpheader[] =
LE32_CONST(BMP_NUMCOLORS), /* Number of important colours */
#if LCD_DEPTH == 1
#ifdef MROBE_100
2, 2, 94, 0x00, /* Colour #0 */
3, 6, 241, 0x00 /* Colour #1 */
#elif
0x90, 0xee, 0x90, 0x00, /* Colour #0 */
0x00, 0x00, 0x00, 0x00 /* Colour #1 */
#endif
#elif LCD_DEPTH == 2
0xe6, 0xd8, 0xad, 0x00, /* Colour #0 */
0x99, 0x90, 0x73, 0x00, /* Colour #1 */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Before After
Before After

View file

@ -702,6 +702,7 @@ void button_event(int key, bool pressed)
case SDLK_SPACE:
new_btn = BUTTON_SELECT;
break;
case SDLK_KP_MULTIPLY:
case SDLK_F8:
case SDLK_ESCAPE:
new_btn = BUTTON_POWER;

View file

@ -27,9 +27,10 @@ int lcd_backlight_val;
#if LCD_DEPTH <= 8
#ifdef HAVE_BACKLIGHT
SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0};
SDL_Color lcd_backlight_color_max = {UI_LCD_FGCOLORLIGHT, 0};
#endif
SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0};
SDL_Color lcd_color_max = {0, 0, 0, 0};
SDL_Color lcd_color_max = {UI_LCD_FGCOLOR, 0};
#endif
#if LCD_DEPTH < 8
@ -79,7 +80,7 @@ void sim_backlight(int value)
#if LCD_DEPTH <= 8
if (value > 0) {
sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero,
&lcd_color_max, 0, (1<<LCD_DEPTH));
&lcd_backlight_color_max, 0, (1<<LCD_DEPTH));
} else {
sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max,
0, (1<<LCD_DEPTH));
@ -87,7 +88,7 @@ void sim_backlight(int value)
#if LCD_DEPTH < 8
if (lcd_ex_shades) {
if (value > 0) {
sdl_set_gradient(lcd_surface, &lcd_color_max,
sdl_set_gradient(lcd_surface, &lcd_backlight_color_max,
&lcd_backlight_color_zero, (1<<LCD_DEPTH),
lcd_ex_shades);
} else {

View file

@ -35,7 +35,8 @@ extern int sim_creat(const char *name);
SDL_Surface* lcd_surface;
SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0};
SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0};
SDL_Color lcd_color_max = {0, 0, 0, 0};
SDL_Color lcd_color_max = {UI_LCD_FGCOLOR, 0};
SDL_Color lcd_backlight_color_max = {UI_LCD_FGCOLORLIGHT, 0};
static unsigned long get_lcd_pixel(int x, int y)
@ -75,7 +76,8 @@ void lcd_update(void)
void sim_backlight(int value)
{
if (value > 0) {
sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max,
sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero,
&lcd_backlight_color_max,
0, (1<<LCD_DEPTH));
} else {
sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max,

View file

@ -31,7 +31,8 @@
#define UI_HEIGHT 406 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 80 /* x position of lcd */
#define UI_LCD_POSY 104 /* y position of lcd (96 for real aspect) */
#define UI_LCD_WIDTH 112
@ -43,7 +44,8 @@
#define UI_HEIGHT 420 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 75 /* x position of lcd */
#define UI_LCD_POSY 116 /* y position of lcd */
#define UI_LCD_WIDTH 132
@ -55,7 +57,8 @@
#define UI_HEIGHT 414 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 87 /* x position of lcd */
#define UI_LCD_POSY 77 /* y position of lcd (69 for real aspect) */
#define UI_LCD_WIDTH 112
@ -67,7 +70,8 @@
#define UI_HEIGHT 334 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (backlight mod) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 21 /* x position of lcd */
#define UI_LCD_POSY 82 /* y position of lcd (74 for real aspect) */
#define UI_LCD_WIDTH 112
@ -79,13 +83,16 @@
#define UI_HEIGHT 508 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 109 /* x position of lcd */
#define UI_LCD_POSY 23 /* y position of lcd */
#define UI_LCD_WIDTH 160
#define UI_LCD_HEIGHT 128
#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
#define UI_REMOTE_FGCOLOR 0, 0, 0 /* foreground color of remote LCD (no backlight) */
#define UI_REMOTE_FGCOLORLIGHT 0, 0, 0 /* foreground color of remote LCD (backlight) */
#define UI_REMOTE_POSX 50 /* x position of remote lcd */
#define UI_REMOTE_POSY 403 /* y position of remote lcd */
#define UI_REMOTE_WIDTH 128
@ -113,7 +120,8 @@
#define UI_HEIGHT 382 /* height of GUI window */
#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 32 /* x position of lcd */
#define UI_LCD_POSY 12 /* y position of lcd */
#define UI_LCD_WIDTH 160
@ -125,7 +133,8 @@
#define UI_HEIGHT 389 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 29 /* x position of lcd */
#define UI_LCD_POSY 16 /* y position of lcd */
#define UI_LCD_WIDTH 160
@ -137,7 +146,8 @@
#define UI_HEIGHT 370 /* height of GUI window */
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 19 /* x position of lcd */
#define UI_LCD_POSY 14 /* y position of lcd */
#define UI_LCD_WIDTH 160
@ -149,7 +159,8 @@
#define UI_HEIGHT 365 /* height of GUI window */
#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 24 /* x position of lcd */
#define UI_LCD_POSY 17 /* y position of lcd */
#define UI_LCD_WIDTH 138
@ -301,7 +312,8 @@
#define UI_HEIGHT 183 /* height of GUI window */
#define UI_LCD_BGCOLOR 94, 104, 84 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 60, 160, 230 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 115 /* x position of lcd */
#define UI_LCD_POSY 54 /* y position of lcd */
#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
@ -318,15 +330,17 @@
#define UI_LCD_HEIGHT 240
#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#elif defined(MROBE_100)
#define UI_TITLE "Olympus M:Robe 100"
#define UI_WIDTH 247 /* width of GUI window */
#define UI_HEIGHT 416 /* height of GUI window */
#define UI_LCD_BGCOLOR 94, 2, 2 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 241, 6, 3 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_BGCOLOR 0, 0, 0 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 94, 2, 2 /* bkgnd color of LCD (backlight) */
#define UI_LCD_FGCOLOR 50, 50, 50 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 241, 6, 3 /* foreground color of LCD (backlight) */
#define UI_LCD_POSX 43 /* x position of lcd */
#define UI_LCD_POSY 25 /* y position of lcd */
#define UI_LCD_WIDTH 160
@ -342,7 +356,8 @@
#define UI_LCD_HEIGHT 240
#define UI_LCD_BGCOLOR 32, 32, 32 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */
#define UI_LCD_BLACK 0, 0, 0 /* black */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#endif
extern SDL_Surface *gui_surface;