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"!
{
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 :