mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
feat(player): reimplemented angles
This commit is contained in:
parent
e46f199606
commit
b6eeea5e9f
3 changed files with 42 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue