feat(player): reimplemented angles

This commit is contained in:
Theo Champion 2025-07-29 19:50:23 +02:00
parent e46f199606
commit b6eeea5e9f
3 changed files with 42 additions and 5 deletions

View file

@ -6,13 +6,13 @@
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/29 13:58:00 by tchampio #+# #+# */
/* Updated: 2025/07/29 14:52:54 by tchampio ### ########.fr */
/* Updated: 2025/07/29 19:47:38 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
#include "../cub3d_data.h"
#include "angle.h"
#include "../consts.h"
#include <stdio.h> // bad
void move_player_forward(t_cub3d_data *data)
{
@ -84,4 +84,8 @@ void move_player(t_cub3d_data *data)
move_player_strafe_left(data);
if (data->keypresses.is_d_pressed)
move_player_strafe_right(data);
if (data->keypresses.is_left_pressed)
turn_left_angle(data);
if (data->keypresses.is_right_pressed)
turn_right_angle(data);
}