forked from len0rd/rockbox
The scroll mode now takes advantage of the clipping support in the new
graphics lib and makes the left-side nice and smooth. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7139 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c47599312
commit
e26d97658d
1 changed files with 7 additions and 3 deletions
|
|
@ -100,6 +100,8 @@ static signed char speed[]={
|
||||||
1,2,3,3,3,2,1,0,-1,-2,-2,-2,-1,0,0,1,
|
1,2,3,3,3,2,1,0,-1,-2,-2,-2,-1,0,0,1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LETTER_WIDTH 12 /* pixels wide */
|
||||||
|
|
||||||
const unsigned char char_gen_12x16[][22] =
|
const unsigned char char_gen_12x16[][22] =
|
||||||
{
|
{
|
||||||
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
|
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
|
||||||
|
|
@ -277,6 +279,8 @@ static void addclock(void)
|
||||||
}
|
}
|
||||||
#endif /* HAVE_RTC */
|
#endif /* HAVE_RTC */
|
||||||
|
|
||||||
|
#define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH)
|
||||||
|
|
||||||
static int scrollit(void)
|
static int scrollit(void)
|
||||||
{
|
{
|
||||||
int b;
|
int b;
|
||||||
|
|
@ -312,7 +316,7 @@ static int scrollit(void)
|
||||||
rb->lcd_mono_bitmap((char *)char_gen_12x16[letter-0x20],
|
rb->lcd_mono_bitmap((char *)char_gen_12x16[letter-0x20],
|
||||||
xx, table[yy&(TABLE_SIZE-1)], 11, 16);
|
xx, table[yy&(TABLE_SIZE-1)], 11, 16);
|
||||||
yy += YADD;
|
yy += YADD;
|
||||||
xx+= LCD_WIDTH/LETTERS_ON_SCREEN;
|
xx+= DRAW_WIDTH/LETTERS_ON_SCREEN;
|
||||||
}
|
}
|
||||||
rb->lcd_set_drawmode(DRMODE_SOLID);
|
rb->lcd_set_drawmode(DRMODE_SOLID);
|
||||||
#ifdef HAVE_RTC
|
#ifdef HAVE_RTC
|
||||||
|
|
@ -322,8 +326,8 @@ static int scrollit(void)
|
||||||
|
|
||||||
x-= XSPEED;
|
x-= XSPEED;
|
||||||
|
|
||||||
if(x < 0) {
|
if(x < -LETTER_WIDTH) {
|
||||||
x += LCD_WIDTH/LETTERS_ON_SCREEN;
|
x += DRAW_WIDTH/LETTERS_ON_SCREEN;
|
||||||
y += YADD;
|
y += YADD;
|
||||||
textpos++;
|
textpos++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue