From ad0985ea1c4841498084dc3bc2158492f207e6fb Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 16 Apr 2013 23:33:19 +0200 Subject: lcd-common: Remove support for specifying y_offset from lcd_puts* functions. This main (and only) purpose for it was to adjust the pixel position of the text in otherwise linebased (scrolling) functions. With pixel-based scrolling this isnt necessary anymore. Change-Id: I2a45b8ca6a3f8f50aa2f6630201b30ce9ddfe043 --- firmware/drivers/lcd-bitmap-common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 97921c6347..7c5df5a3a8 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -445,7 +445,7 @@ static void LCDFN(putsxyofs_style)(int xpos, int ypos, /*** Line oriented text output ***/ static void LCDFN(putsofs_style)(int x, int y, const unsigned char *str, - int style, int x_offset, int y_offset) + int style, int x_offset) { int xpos, ypos, h; if(!str) @@ -463,12 +463,12 @@ static void LCDFN(putsofs_style)(int x, int y, const unsigned char *str, ypos = y; } LCDFN(scroll_stop_viewport_rect)(current_vp, xpos, ypos, current_vp->width - xpos, h); - LCDFN(putsxyofs_style)(xpos, ypos+y_offset, str, style, x_offset); + LCDFN(putsxyofs_style)(xpos, ypos, str, style, x_offset); } void LCDFN(puts)(int x, int y, const unsigned char *str) { - LCDFN(putsofs_style)(x, y, str, STYLE_DEFAULT, 0, 0); + LCDFN(putsofs_style)(x, y, str, STYLE_DEFAULT, 0); } /* Formatting version of LCDFN(puts) */ @@ -504,7 +504,7 @@ void LCDFN(scroll_fn)(struct scrollinfo* s) } static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, - int style, int x_offset, int y_offset, + int style, int x_offset, bool linebased, void (*scroll_func)(struct scrollinfo *), void *data) @@ -521,7 +521,7 @@ static void LCDFN(puts_scroll_worker)(int x, int y, const unsigned char *string, * for find_scrolling_line() to work */ cwidth = font_get(current_vp->font)->maxwidth; height = font_get(current_vp->font)->height; - y = y * (linebased ? height : 1) + y_offset; + y = y * (linebased ? height : 1); x = x * (linebased ? cwidth : 1); width = current_vp->width - x; @@ -588,13 +588,13 @@ void LCDFN(putsxy_scroll_func)(int x, int y, const unsigned char *string, if (!scroll_func) LCDFN(putsxyofs)(x, y, x_offset, string); else - LCDFN(puts_scroll_worker)(x, y, string, STYLE_NONE, x_offset, 0, + LCDFN(puts_scroll_worker)(x, y, string, STYLE_NONE, x_offset, false, scroll_func, data); } void LCDFN(puts_scroll)(int x, int y, const unsigned char *string) { - LCDFN(puts_scroll_worker)(x, y, string, STYLE_DEFAULT, 0, 0, + LCDFN(puts_scroll_worker)(x, y, string, STYLE_DEFAULT, 0, true, LCDFN(scroll_fn), NULL); } -- cgit