summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-recorder.c
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-22 04:24:26 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-22 04:24:26 +0000
commitd3a03b679f196be076043d475b9512338fd6c8bb (patch)
treec4c57a157a46d09a7037c39e290182a8c43deb71 /firmware/drivers/lcd-recorder.c
parentbfe740712a3513dbb4143336cbc5e9aaab09d732 (diff)
downloadrockbox-d3a03b679f196be076043d475b9512338fd6c8bb.tar.gz
rockbox-d3a03b679f196be076043d475b9512338fd6c8bb.zip
Horizontal screen scrolling part 3 (by Shachar Liberman)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r--firmware/drivers/lcd-recorder.c58
1 files changed, 30 insertions, 28 deletions
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)
917 917
918/*** Line oriented text output ***/ 918/*** Line oriented text output ***/
919 919
920/* put a string at a given char position at a given style and with a given pixel position */ 920/* put a string at a given char position */
921void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, 921void lcd_puts(int x, int y, const unsigned char *str)
922 int offset) 922{
923 lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0);
924}
925
926void lcd_puts_style(int x, int y, const unsigned char *str, int style)
927{
928 lcd_puts_style_offset(x, y, str, style, 0);
929}
930
931void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
932{
933 lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset);
934}
935
936/* put a string at a given char position, style, and pixel position,
937 * skipping first offset pixel columns */
938void lcd_puts_style_offset(int x, int y, const unsigned char *str,
939 int style, int offset)
923{ 940{
924 int xpos,ypos,w,h; 941 int xpos,ypos,w,h;
925 int lastmode = drawmode; 942 int lastmode = drawmode;
@@ -944,23 +961,6 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
944 drawmode = lastmode; 961 drawmode = lastmode;
945} 962}
946 963
947void lcd_puts_style(int x, int y, const unsigned char *str, int style)
948{
949 lcd_puts_style_offset(x, y, str, style, 0);
950}
951
952/* put a string at a given char position at a given offset mark */
953void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
954{
955 lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, offset);
956}
957
958/* put a string at a given char position */
959void lcd_puts(int x, int y, const unsigned char *str)
960{
961 lcd_puts_style_offset(x, y, str, STYLE_DEFAULT, 0);
962}
963
964/*** scrolling ***/ 964/*** scrolling ***/
965 965
966/* Reverse the invert setting of the scrolling line (if any) at given char 966/* Reverse the invert setting of the scrolling line (if any) at given char
@@ -1002,20 +1002,21 @@ void lcd_bidir_scroll(int percent)
1002 1002
1003void lcd_puts_scroll(int x, int y, const unsigned char *string) 1003void lcd_puts_scroll(int x, int y, const unsigned char *string)
1004{ 1004{
1005 lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, 0); 1005 lcd_puts_scroll_style(x, y, string, STYLE_DEFAULT);
1006} 1006}
1007 1007
1008void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, int offset)
1009{
1010 lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset);
1011}
1012
1013void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style) 1008void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style)
1014{ 1009{
1015 lcd_puts_scroll_style_offset(x, y, string, style, 0); 1010 lcd_puts_scroll_style_offset(x, y, string, style, 0);
1016} 1011}
1017 1012
1018void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, 1013void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
1014 int offset)
1015{
1016 lcd_puts_scroll_style_offset(x, y, string, STYLE_DEFAULT, offset);
1017}
1018
1019void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string,
1019 int style, int offset) 1020 int style, int offset)
1020{ 1021{
1021 struct scrollinfo* s; 1022 struct scrollinfo* s;
@@ -1130,7 +1131,8 @@ static void scroll_thread(void)
1130 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1131 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1131 drawmode = DRMODE_SOLID; 1132 drawmode = DRMODE_SOLID;
1132 lcd_putsxyofs(xpos, ypos, s->offset, s->line); 1133 lcd_putsxyofs(xpos, ypos, s->offset, s->line);
1133 if (s->invert) { 1134 if (s->invert)
1135 {
1134 drawmode = DRMODE_COMPLEMENT; 1136 drawmode = DRMODE_COMPLEMENT;
1135 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1137 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1136 } 1138 }