plr orientation at begining

This commit is contained in:
hugogogo
2022-05-04 00:55:47 +02:00
parent eb3b5c37a8
commit 3c76a8646a
13 changed files with 176 additions and 193 deletions

View File

@@ -32,24 +32,23 @@ int hook_action(t_game *game)
plr_turn_right(&(game->plr));
// tmp draw map
// temp display one ray with infos
if (!ft_arrint(game->k_hook, 65364, MAX_NB_KEY))
{
if (game->ray_highlight <= SCREEN_WIDTH)
game->ray_highlight++;
else
game->ray_highlight = -1;
is_action = 1;
}
if (!ft_arrint(game->k_hook, 65362, MAX_NB_KEY))
{
if (game->ray_highlight >= 0)
game->ray_highlight--;
else
game->ray_highlight = SCREEN_WIDTH;
is_action = 1;
}
// temp end
// // ray
// if (!ft_arrint(game->k_hook, 65364, MAX_NB_KEY))
// {
// if (game->ray_highlight <= SCREEN_WIDTH)
// game->ray_highlight++;
// else
// game->ray_highlight = -1;
// is_action = 1;
// }
// if (!ft_arrint(game->k_hook, 65362, MAX_NB_KEY))
// {
// if (game->ray_highlight >= 0)
// game->ray_highlight--;
// else
// game->ray_highlight = SCREEN_WIDTH;
// is_action = 1;
// }
// tmp end
if (is_action)