summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-09-06 07:45:10 +0000
committerJens Arnold <amiconn@rockbox.org>2006-09-06 07:45:10 +0000
commitcbee01ed622dbf19347013c78649eed7a8e4d987 (patch)
tree6eb5da1c8a27ef010b536d4968bca3fa5f4ba9ab /apps
parentd540ab9a1257ae43f9e83b8e44ae7e817fbb479b (diff)
downloadrockbox-cbee01ed622dbf19347013c78649eed7a8e4d987.tar.gz
rockbox-cbee01ed622dbf19347013c78649eed7a8e4d987.tar.bz2
rockbox-cbee01ed622dbf19347013c78649eed7a8e4d987.zip
More natural bouncing cards animation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10897 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/solitaire.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 6b67ddb59c..45266c5a7d 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -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;