fixed compiler warning
[rocksndiamonds.git] / src / game_bd / bd_caveengine.c
index ab4becd4ebc97e67cbcb62e154de81925f6a3a69..4d528a4100830ef34ead812e8255cb300e896e52 100644 (file)
@@ -1609,7 +1609,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
       for (x = 0; x < cave->w; x++)
       {
        /* timer for the cell > 0? */
-       if (cave->hammered_reappear[y][x]>0)
+       if (cave->hammered_reappear[y][x] > 0)
        {
          /* decrease timer */
          cave->hammered_reappear[y][x]--;
@@ -1680,7 +1680,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          cave->player_seen_ago = 0;
          /* bd4 intermission caves have many players. so if one of them has exited,
           * do not change the flag anymore. so this if () is needed */
-         if (cave->player_state!=GD_PL_EXITED)
+         if (cave->player_state != GD_PL_EXITED)
            cave->player_state = GD_PL_LIVING;
 
          /* check for pneumatic hammer things */
@@ -1898,7 +1898,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          cave->player_seen_ago = 0;
          /* bd4 intermission caves have many players. so if one of them has exited,
           * do not change the flag anymore. so this if () is needed */
-         if (cave->player_state!=GD_PL_EXITED)
+         if (cave->player_state != GD_PL_EXITED)
            cave->player_state = GD_PL_LIVING;
 
          if (player_fire)
@@ -1921,7 +1921,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          }
 
          cave->player_seen_ago = 0;
-         if (cave->player_state!=GD_PL_EXITED)
+         if (cave->player_state != GD_PL_EXITED)
            cave->player_state = GD_PL_LIVING;
 
          /* if hammering time is up, becomes a normal player again. */
@@ -2260,7 +2260,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          {
            const GdDirection *creature_move;
            boolean ccw = rotates_ccw(cave, x, y);    /* check if default is counterclockwise */
-           GdElement base;    /* base element number (which is like O_***_1) */
+           GdElement base = -1;    /* base element number (which is like O_***_1) */
            int dir, dirn, dirp;    /* direction */
 
            if (get(cave, x, y) >= O_FIREFLY_1 &&
@@ -2279,7 +2279,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
                     get(cave, x, y) <= O_ALT_BUTTER_4)
              base = O_ALT_BUTTER_1;
 
-           dir = get(cave, x, y)-base;    /* facing where */
+           dir = get(cave, x, y) - base;    /* facing where */
            creature_move = cave->creatures_backwards ? creature_chdir : creature_dir;
 
            /* now change direction if backwards */