mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
This commit is contained in:
parent
f301ac05f9
commit
0942e2a0f7
59 changed files with 47 additions and 143 deletions
|
@ -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;i<NB_SLOTS;i++){
|
||||
for(int i=0;i<NB_SLOTS;i++){
|
||||
game->slot_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;i<NB_SLOTS;i++)
|
||||
for(int i=0;i<NB_SLOTS;i++)
|
||||
{
|
||||
nb_turns[i]=(rb->rand()%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;i<NB_SLOTS;i++)
|
||||
for(int i=0;i<NB_SLOTS;i++)
|
||||
{
|
||||
if(nb_turns[i]>0)
|
||||
{
|
||||
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue