forked from len0rd/rockbox
More natural bouncing cards animation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10897 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d540ab9a12
commit
cbee01ed62
1 changed files with 3 additions and 3 deletions
|
@ -1093,13 +1093,13 @@ int bouncing_cards( void )
|
|||
vx = rb->rand()%8-5;
|
||||
if( !vx ) vx = -6;
|
||||
|
||||
vy = -rb->rand()%6;
|
||||
vy = -rb->rand()%(6<<8);
|
||||
|
||||
while( x < LCD_WIDTH && x + CARD_WIDTH > 0 )
|
||||
{
|
||||
vy += 1;
|
||||
vy += (1<<8);
|
||||
x += vx;
|
||||
y += vy;
|
||||
y += vy >> 8;
|
||||
if( y + CARD_HEIGHT >= LCD_HEIGHT )
|
||||
{
|
||||
vy = -vy*3/4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue