lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.

These where used for line styling during scrolling, which is now done in apps/,
The  viewport struct doesn't need to record these anymore.

Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
This commit is contained in:
Thomas Martitz 2013-04-30 07:41:05 +02:00
parent deb6ac3693
commit e1c7b3b8f7
11 changed files with 3 additions and 77 deletions

View file

@ -1957,9 +1957,9 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
skin_vp->start_bgcolour = skin_vp->vp.bg_pattern;
#endif
#ifdef HAVE_LCD_COLOR
skin_vp->start_gradient.start = skin_vp->vp.lss_pattern;
skin_vp->start_gradient.end = skin_vp->vp.lse_pattern;
skin_vp->start_gradient.text = skin_vp->vp.lst_pattern;
skin_vp->start_gradient.start = global_settings.lss_color;
skin_vp->start_gradient.end = global_settings.lse_color;
skin_vp->start_gradient.text = global_settings.lst_color;
#endif

View file

@ -859,11 +859,6 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
skin_backdrop_show(data->backdrop_id);
}
#endif
#ifdef HAVE_LCD_COLOR
skin_viewport->vp.lss_pattern = skin_viewport->start_gradient.start;
skin_viewport->vp.lse_pattern = skin_viewport->start_gradient.end;
skin_viewport->vp.lst_pattern = skin_viewport->start_gradient.text;
#endif
/* dont redraw the viewport if its disabled */
if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)

View file

@ -329,11 +329,6 @@ void viewport_set_fullscreen(struct viewport *vp,
{
vp->fg_pattern = FG_FALLBACK;
vp->bg_pattern = BG_FALLBACK;
#ifdef HAVE_LCD_COLOR
vp->lss_pattern = global_settings.lss_color;
vp->lse_pattern = global_settings.lse_color;
vp->lst_pattern = global_settings.lst_color;
#endif
}
#endif

View file

@ -240,11 +240,6 @@ static struct viewport* opt_viewport(lua_State *L, int narg, struct viewport* al
#if LCD_DEPTH > 1
check_tablevalue(L, "fg_pattern", tablepos, &vp->fg_pattern, true);
check_tablevalue(L, "bg_pattern", tablepos, &vp->bg_pattern, true);
#ifdef HAVE_LCD_COLOR
check_tablevalue(L, "lss_pattern", tablepos, &vp->lss_pattern, true);
check_tablevalue(L, "lse_pattern", tablepos, &vp->lse_pattern, true);
check_tablevalue(L, "lst_pattern", tablepos, &vp->lst_pattern, true);
#endif
#endif
return vp;

View file

@ -188,9 +188,6 @@ static bool game_finished;
* int drawmode- Modes defined in lcd.h
* unsigned fg_pattern - foreground color
* unsigned bg_pattern - backbround color
* unsigned lss_pattern - Selector colors (currently unused)
* unsigned lse_pattern - |
* unsigned lst_pattern - \/
*
* The rest of the touch button elements are:
* bool repeat - requires the area be held for the action

View file

@ -47,11 +47,6 @@ static struct viewport vp0 =
.fg_pattern = LCD_DEFAULT_FG,
.bg_pattern = BGCOLOR_1,
#endif
#ifdef HAVE_LCD_COLOR
.lss_pattern = LCD_DEFAULT_BG,
.lse_pattern = LCD_DEFAULT_BG,
.lst_pattern = LCD_DEFAULT_BG,
#endif
};
static struct viewport vp1 =
@ -65,11 +60,6 @@ static struct viewport vp1 =
#if LCD_DEPTH > 1
.fg_pattern = LCD_DEFAULT_FG,
.bg_pattern = LCD_DEFAULT_BG,
#ifdef HAVE_LCD_COLOR
.lss_pattern = LCD_DEFAULT_BG,
.lse_pattern = LCD_DEFAULT_BG,
.lst_pattern = LCD_DEFAULT_BG,
#endif
#endif
};
@ -84,11 +74,6 @@ static struct viewport vp2 =
#if LCD_DEPTH > 1
.fg_pattern = FGCOLOR_1,
.bg_pattern = BGCOLOR_2,
#ifdef HAVE_LCD_COLOR
.lss_pattern = LCD_DEFAULT_BG,
.lse_pattern = LCD_DEFAULT_BG,
.lst_pattern = LCD_DEFAULT_BG,
#endif
#endif
};
@ -104,11 +89,6 @@ static struct viewport vp3 =
#if LCD_DEPTH > 1
.fg_pattern = LCD_BLACK,
.bg_pattern = LCD_WHITE,
#ifdef HAVE_LCD_COLOR
.lss_pattern = LCD_DEFAULT_BG,
.lse_pattern = LCD_DEFAULT_BG,
.lst_pattern = LCD_DEFAULT_BG,
#endif
#endif
};

View file

@ -231,11 +231,6 @@ struct screen screens[NB_SCREENS] =
.get_foreground=&lcd_get_foreground,
.set_background=&lcd_set_background,
.set_foreground=&lcd_set_foreground,
#ifdef HAVE_LCD_COLOR
.set_selector_start=&lcd_set_selector_start,
.set_selector_end=&lcd_set_selector_end,
.set_selector_text=&lcd_set_selector_text,
#endif
#endif /* LCD_DEPTH > 1 */
.update_rect=&lcd_update_rect,
.update_viewport_rect=&lcd_update_viewport_rect,

View file

@ -102,11 +102,6 @@ struct screen
void (*set_background)(unsigned background);
void (*set_foreground)(unsigned foreground);
#endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */
#if defined(HAVE_LCD_COLOR)
void (*set_selector_start)(unsigned selector);
void (*set_selector_end)(unsigned selector);
void (*set_selector_text)(unsigned selector_text);
#endif
void (*update_rect)(int x, int y, int width, int height);
void (*update_viewport_rect)(int x, int y, int width, int height);
void (*fillrect)(int x, int y, int width, int height);

View file

@ -994,9 +994,6 @@ void settings_apply(bool read_disk)
#ifdef HAVE_LCD_COLOR
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
screens[SCREEN_MAIN].set_selector_start(global_settings.lss_color);
screens[SCREEN_MAIN].set_selector_end(global_settings.lse_color);
screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color);
#endif
#ifdef HAVE_LCD_BITMAP

View file

@ -52,9 +52,6 @@ static struct viewport default_vp =
.drawmode = DRMODE_SOLID,
.fg_pattern = LCD_DEFAULT_FG,
.bg_pattern = LCD_DEFAULT_BG,
.lss_pattern = LCD_DEFAULT_BG,
.lse_pattern = LCD_DEFAULT_BG,
.lst_pattern = LCD_DEFAULT_BG,
};
static struct viewport* current_vp IDATA_ATTR = &default_vp;
@ -181,21 +178,6 @@ unsigned lcd_get_background(void)
return current_vp->bg_pattern;
}
void lcd_set_selector_start(unsigned color)
{
current_vp->lss_pattern = color;
}
void lcd_set_selector_end(unsigned color)
{
current_vp->lse_pattern = color;
}
void lcd_set_selector_text(unsigned color)
{
current_vp->lst_pattern = color;
}
void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
{
lcd_set_drawmode(mode);

View file

@ -48,11 +48,6 @@ struct viewport {
#if LCD_DEPTH > 1
unsigned fg_pattern;
unsigned bg_pattern;
#ifdef HAVE_LCD_COLOR
unsigned lss_pattern;
unsigned lse_pattern;
unsigned lst_pattern;
#endif
#endif
};