From 32e6f114aabc0939a5c5db16a6ad650efcfc7f18 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 22 Sep 2006 22:44:57 +0000 Subject: Tweaked the card animation a bit more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11028 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/solitaire.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/plugins/solitaire.c') diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index a0423b133a..7ccce3daf3 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -1015,7 +1015,7 @@ enum { SOLITAIRE_WIN, SOLITAIRE_QUIT, SOLITAIRE_USB }; #define BC_ACCEL ((1<<16)*LCD_HEIGHT/128) #define BC_MYSPEED (6*BC_ACCEL) -#define BC_MXSPEED (6*LCD_WIDTH/160) +#define BC_MXSPEED (6*LCD_HEIGHT/128) int bouncing_cards( void ) { @@ -1036,9 +1036,15 @@ int bouncing_cards( void ) x = LCD_WIDTH-(CARD_WIDTH*4+4+MARGIN)+CARD_WIDTH*j+j+1; fp_y = MARGIN<<16; +#if LCD_WIDTH > 200 + vx = rb->rand() % (4*BC_MXSPEED/3-2) - BC_MXSPEED; + if( vx >= -1 ) + vx += 3; +#else vx = rb->rand() % (4*BC_MXSPEED/3) - BC_MXSPEED; if( vx >= 0 ) vx++; +#endif fp_vy = -rb->rand() % BC_MYSPEED; -- cgit v1.2.3