From 790674652694bf5af70489e386e48ebd2a117771 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 3 Dec 2024 19:15:33 +0100 Subject: [PATCH] minor whitespace changes --- src/game_bd/bd_gameplay.c | 14 +++++++------- src/game_bd/main_bd.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 39c73835..1f098877 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -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"! { diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index febe4341..de01f292 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -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); } -- 2.34.1