minor whitespace changes
authorHolger Schemel <holger.schemel@virtion.de>
Tue, 3 Dec 2024 18:15:33 +0000 (19:15 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Tue, 3 Dec 2024 13:48:06 +0000 (14:48 +0100)
src/game_bd/bd_gameplay.c
src/game_bd/main_bd.c

index 39c73835e45d59e92c79474a3712c7955fc93106..1f098877b86d49c2b18d995cad3eaa55ed3bd416 100644 (file)
@@ -268,8 +268,8 @@ static void iterate_cave(GdGame *game, GdDirection player_move, boolean fire)
       {
        int action_bd = map_action_RND_to_BD(action_rnd[0]);
 
-       player_move = (action_bd & GD_REPLAY_MOVE_MASK);
-       fire        = (action_bd & GD_REPLAY_FIRE_MASK) != 0;
+       player_move = ((action_bd & GD_REPLAY_MOVE_MASK));
+       fire        = ((action_bd & GD_REPLAY_FIRE_MASK)    != 0);
       }
     }
 
@@ -655,11 +655,11 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean
 void play_game_func(GdGame *game, int action)
 {
   GdGameState state;
-  boolean move_up    = ((action & JOY_UP)    != 0);
-  boolean move_down  = ((action & JOY_DOWN)  != 0);
-  boolean move_left  = ((action & JOY_LEFT)  != 0);
-  boolean move_right = ((action & JOY_RIGHT) != 0);
-  boolean fire  = ((action & (JOY_BUTTON_1 | JOY_BUTTON_2)) != 0);
+  boolean move_up    = ((action & JOY_UP)      != 0);
+  boolean move_down  = ((action & JOY_DOWN)    != 0);
+  boolean move_left  = ((action & JOY_LEFT)    != 0);
+  boolean move_right = ((action & JOY_RIGHT)   != 0);
+  boolean fire       = ((action & (JOY_BUTTON_1 | JOY_BUTTON_2)) != 0);
 
   if (game->player_move_stick || move_up || move_down || move_left || move_right) // no "fire"!
   {
index febe4341401e8a9176fe992214f044a6ddd8f763..de01f2922bc6f2baf871a566675cd6164ad19fb5 100644 (file)
@@ -202,15 +202,15 @@ int map_action_RND_to_BD(int action)
                                                       action & JOY_DOWN,
                                                       action & JOY_LEFT,
                                                       action & JOY_RIGHT);
-  boolean player_fire = (action & (JOY_BUTTON_1 | JOY_BUTTON_2));
+  boolean player_fire    = (action & (JOY_BUTTON_1 | JOY_BUTTON_2));
 
   return (player_move | (player_fire ? GD_REPLAY_FIRE_MASK : 0));
 }
 
 int map_action_BD_to_RND(int action)
 {
-  GdDirection player_move = action & GD_REPLAY_MOVE_MASK;
-  boolean     player_fire = action & GD_REPLAY_FIRE_MASK;
+  GdDirection player_move    = action & GD_REPLAY_MOVE_MASK;
+  boolean     player_fire    = action & GD_REPLAY_FIRE_MASK;
 
   int action_move = (player_move == GD_MV_UP           ? JOY_UP                :
                     player_move == GD_MV_UP_RIGHT      ? JOY_UP   | JOY_RIGHT  :
@@ -220,7 +220,7 @@ int map_action_BD_to_RND(int action)
                     player_move == GD_MV_DOWN_LEFT     ? JOY_DOWN | JOY_LEFT   :
                     player_move == GD_MV_LEFT          ?            JOY_LEFT   :
                     player_move == GD_MV_UP_LEFT       ? JOY_UP   | JOY_LEFT   : JOY_NO_ACTION);
-  int action_fire = (player_fire ? JOY_BUTTON_1 : JOY_NO_ACTION);
+  int action_fire    = (player_fire    ? JOY_BUTTON_1 : JOY_NO_ACTION);
 
   return (action_move | action_fire);
 }