forked from len0rd/rockbox
* Speed up the level transition in Star for iPod Video (else it's sloooooow).
* Remove a bunch of trailing spaces. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13578 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d90042dbaa
commit
e8c94d898d
1 changed files with 26 additions and 21 deletions
|
|
@ -514,26 +514,31 @@ void star_display_text(char *str, bool waitkey)
|
|||
/* FIXME: this crashes on the Gigabeat but not in the sim */
|
||||
static void star_transition_update(void)
|
||||
{
|
||||
int center_x = LCD_WIDTH / 2;
|
||||
int center_y = LCD_HEIGHT / 2;
|
||||
const int center_x = LCD_WIDTH / 2;
|
||||
const int center_y = LCD_HEIGHT / 2;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
#if LCD_WIDTH >= LCD_HEIGHT
|
||||
int lcd_demi_width = LCD_WIDTH / 2;
|
||||
#if defined(IPOD_VIDEO)
|
||||
const int step = 4;
|
||||
#else
|
||||
const int step = 1;
|
||||
#endif
|
||||
const int lcd_demi_width = LCD_WIDTH / 2;
|
||||
int var_y = 0;
|
||||
|
||||
for (; x < lcd_demi_width ; x++)
|
||||
for (; x < lcd_demi_width ; x+=step)
|
||||
{
|
||||
var_y += LCD_HEIGHT;
|
||||
if (var_y > LCD_WIDTH)
|
||||
{
|
||||
var_y -= LCD_WIDTH;
|
||||
y++;
|
||||
y+=step;
|
||||
}
|
||||
rb->lcd_update_rect(center_x - x, center_y - y, x * 2, 1);
|
||||
rb->lcd_update_rect(center_x - x, center_y - y, 1, y * 2);
|
||||
rb->lcd_update_rect(center_x + x - 1, center_y - y, 1, y * 2);
|
||||
rb->lcd_update_rect(center_x - x, center_y + y - 1, x * 2, 1);
|
||||
rb->lcd_update_rect(center_x - x, center_y - y, x*2, step);
|
||||
rb->lcd_update_rect(center_x - x, center_y - y, step, y*2);
|
||||
rb->lcd_update_rect(center_x + x - step, center_y - y, step, y*2);
|
||||
rb->lcd_update_rect(center_x - x, center_y + y - step, x*2, step);
|
||||
STAR_SLEEP
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue