From f5b4ea457d68cc0388c926e6f5f2a379927b8c16 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 3 Dec 2024 19:48:38 +0100 Subject: [PATCH] minor changes (no functional changes) --- src/game_bd/bd_gameplay.c | 2 +- src/game_bd/main_bd.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 1f098877..94bdca2b 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -659,7 +659,7 @@ void play_game_func(GdGame *game, int action) 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 fire = ((action & JOY_BUTTON) != 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 de01f292..fdf7afaf 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)); + int player_fire = ((action & JOY_BUTTON) != 0 ? GD_REPLAY_FIRE_MASK : 0); - return (player_move | (player_fire ? GD_REPLAY_FIRE_MASK : 0)); + return (player_move | player_fire); } 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) != 0); int action_move = (player_move == GD_MV_UP ? JOY_UP : player_move == GD_MV_UP_RIGHT ? JOY_UP | JOY_RIGHT : -- 2.34.1