tmp bring back rays and highlight for debug purpose

This commit is contained in:
hugogogo
2022-05-03 21:43:00 +02:00
parent 4414917234
commit 101680c839
6 changed files with 185 additions and 1 deletions

View File

@@ -30,6 +30,28 @@ int hook_action(t_game *game)
plr_turn_left(&(game->plr));
if (is_turn_right(game->k_hook, &is_action))
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
// tmp end
if (is_action)
draw(game);
return(0);