summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2006-06-11 13:25:44 +0000
committerAntoine Cellerier <dionoea@videolan.org>2006-06-11 13:25:44 +0000
commitfb3c06680cf59d509c290ffe323ee140c9e31ba5 (patch)
tree2b3ba16ba5b3a77342602198f3f58770f3d39e26
parentdc4bf7c9a33ca7680a23804c83837f2e965c372a (diff)
downloadrockbox-fb3c06680cf59d509c290ffe323ee140c9e31ba5.tar.gz
rockbox-fb3c06680cf59d509c290ffe323ee140c9e31ba5.zip
Make the ball/block move faster on color screens.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10111 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/star.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 599ad2b4b1..5c89a795c8 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -48,7 +48,11 @@ PLUGIN_HEADER
48#define STAR_BLOCK 'x' 48#define STAR_BLOCK 'x'
49 49
50/* sleep time between two frames */ 50/* sleep time between two frames */
51#define STAR_SLEEP 1 51#ifdef HAVE_LCD_COLOR
52#define STAR_SLEEP ;
53#else
54#define STAR_SLEEP rb->sleep(1);
55#endif
52 56
53/* value of ball and block control */ 57/* value of ball and block control */
54#define STAR_CONTROL_BALL 0 58#define STAR_CONTROL_BALL 0
@@ -540,7 +544,7 @@ static void star_transition_update(void)
540 } 544 }
541 rb->lcd_update_rect(center_x - x, center_y - y, 545 rb->lcd_update_rect(center_x - x, center_y - y,
542 x * 2, y * 2); 546 x * 2, y * 2);
543 rb->sleep(STAR_SLEEP); 547 STAR_SLEEP
544 } 548 }
545 rb->lcd_update(); 549 rb->lcd_update();
546} 550}
@@ -785,7 +789,7 @@ static int star_run_game(void)
785 STAR_TILE_SIZE, STAR_TILE_SIZE); 789 STAR_TILE_SIZE, STAR_TILE_SIZE);
786#endif 790#endif
787 791
788 rb->sleep(STAR_SLEEP); 792 STAR_SLEEP
789 } 793 }
790 ball_x += move_x; 794 ball_x += move_x;
791 ball_y += move_y; 795 ball_y += move_y;
@@ -834,7 +838,7 @@ static int star_run_game(void)
834 STAR_TILE_SIZE, STAR_TILE_SIZE); 838 STAR_TILE_SIZE, STAR_TILE_SIZE);
835#endif 839#endif
836 840
837 rb->sleep(STAR_SLEEP); 841 STAR_SLEEP
838 } 842 }
839 block_x += move_x; 843 block_x += move_x;
840 block_y += move_y; 844 block_y += move_y;
@@ -895,7 +899,7 @@ static int star_menu(void)
895 rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], 899 rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
896 2, menu_offset_y + menu_y * char_height, 7, 8); 900 2, menu_offset_y + menu_y * char_height, 7, 8);
897 rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8); 901 rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8);
898 rb->sleep(STAR_SLEEP); 902 STAR_SLEEP
899 anim_state++; 903 anim_state++;
900 904
901 key = rb->button_get(false); 905 key = rb->button_get(false);
@@ -972,7 +976,7 @@ static int star_menu(void)
972 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8); 976 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8);
973 rb->lcd_update_rect(2, 30, 8, 4 * 8); 977 rb->lcd_update_rect(2, 30, 8, 4 * 8);
974 anim_state++; 978 anim_state++;
975 rb->sleep(STAR_SLEEP); 979 STAR_SLEEP
976 } 980 }
977 rb->lcd_set_drawmode(DRMODE_SOLID); 981 rb->lcd_set_drawmode(DRMODE_SOLID);
978 menu_y += move_y; 982 menu_y += move_y;