From 0942e2a0f71d809c1d7f2606cbddfa1d4beacb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Sat, 15 Oct 2011 19:35:02 +0000 Subject: Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/jackpot.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/plugins/jackpot.c') diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 08eeb2c..aa9defd 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -119,9 +119,8 @@ static void jackpot_exit(void) static void jackpot_init(struct jackpot* game) { - int i,j; game->money=20; - for(i=0;islot_state[i]=(rb->rand()%NB_PICTURES)*PICTURE_ROTATION_STEPS; FOR_NB_SCREENS(j) game->state_y[j][i]=-1; @@ -254,11 +253,11 @@ static void jackpot_play_turn(struct jackpot* game) { /* How many pattern? */ int nb_turns[NB_SLOTS]; - int i,d,gain,turns_remaining=0; + int gain,turns_remaining=0; if(game->money<=0) return; game->money--; - for(i=0;irand()%15+5)*PICTURE_ROTATION_STEPS; turns_remaining+=nb_turns[i]; @@ -271,7 +270,7 @@ static void jackpot_play_turn(struct jackpot* game) /* Jackpot Animation */ while(turns_remaining>0) { - for(i=0;i0) { @@ -295,7 +294,7 @@ static void jackpot_play_turn(struct jackpot* game) enum plugin_status plugin_start(const void* parameter) { - int action, i; + int action; struct jackpot game; (void)parameter; atexit(jackpot_exit); -- cgit v1.1