tmp bring back rays and highlight for debug purpose
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user