From d3a03b679f196be076043d475b9512338fd6c8bb Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Sun, 22 Jan 2006 04:24:26 +0000 Subject: Horizontal screen scrolling part 3 (by Shachar Liberman) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8414 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-recorder.c | 58 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'firmware/drivers/lcd-recorder.c') diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 9f8a2b6568..b7bcd02cec 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -917,9 +917,26 @@ void lcd_putsxy(int x, int y, const unsigned char *str) /*** Line oriented text output ***/ -/* put a string at a given char position at a given style and with a given pixel position */ -void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, - int offset) +/* put a string at a given char position */ +void lcd_puts(int x, int y, const unsigned char *str) +{ + lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0); +} + +void lcd_puts_style(int x, int y, const unsigned char *str, int style) +{ + lcd_puts_style_offset(x, y, str, style, 0); +} + +void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) +{ + lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); +} + +/* put a string at a given char position, style, and pixel position, + * skipping first offset pixel columns */ +void lcd_puts_style_offset(int x, int y, const unsigned char *str, + int style, int offset) { int xpos,ypos,w,h; int lastmode = drawmode; @@ -944,23 +961,6 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, drawmode = lastmode; } -void lcd_puts_style(int x, int y, const unsigned char *str, int style) -{ - lcd_puts_style_offset(x, y, str, style, 0); -} - -/* put a string at a given char position at a given offset mark */ -void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) -{ - lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset); -} - -/* put a string at a given char position */ -void lcd_puts(int x, int y, const unsigned char *str) -{ - lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0); -} - /*** scrolling ***/ /* Reverse the invert setting of the scrolling line (if any) at given char @@ -1002,20 +1002,21 @@ void lcd_bidir_scroll(int percent) void lcd_puts_scroll(int x, int y, const unsigned char *string) { - lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, 0); + lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT); } -void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, int offset) -{ - lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset); -} - void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style) { lcd_puts_scroll_style_offset(x, y, string, style, 0); } -void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, +void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, + int offset) +{ + lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset); +} + +void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, int style, int offset) { struct scrollinfo* s; @@ -1130,7 +1131,8 @@ static void scroll_thread(void) lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); drawmode = DRMODE_SOLID; lcd_putsxyofs(xpos, ypos, s->offset, s->line); - if (s->invert) { + if (s->invert) + { drawmode = DRMODE_COMPLEMENT; lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); } -- cgit v1.2.3