fix: renamed ANGLE_SPEED to ROTATION_SPEED

This commit is contained in:
Theo Champion 2025-07-25 14:54:13 +02:00 committed by Khaïs COLIN
parent 38feba022f
commit 0ce0ea78ee
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */ /* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
/* Updated: 2025/07/24 14:17:52 by tchampio ### ########.fr */ /* Updated: 2025/07/25 14:53:56 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -17,7 +17,7 @@
# define WIDTH 800 # define WIDTH 800
# define RESSOURCE_DIR "ressources" # define RESSOURCE_DIR "ressources"
# define MOVEMENT_SPEED 0.1 # define MOVEMENT_SPEED 0.1
# define ANGLE_SPEED 0.1 # define ROTATION_SPEED 0.1
# ifdef BONUS # ifdef BONUS
# define COMPILED_TEXT "Compiled with bonuses" # define COMPILED_TEXT "Compiled with bonuses"
# else # else

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:22:57 by kcolin #+# #+# */ /* Created: 2025/07/17 14:22:57 by kcolin #+# #+# */
/* Updated: 2025/07/24 14:47:14 by tchampio ### ########.fr */ /* Updated: 2025/07/25 14:55:54 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -23,9 +23,9 @@ int keypress_handler(int keycode, t_cub3d_data *data)
if (keycode == XK_Escape) if (keycode == XK_Escape)
destroy(data); destroy(data);
if (keycode == XK_Left) if (keycode == XK_Left)
data->player.yaw += ANGLE_SPEED; data->player.yaw += ROTATION_SPEED;
else if (keycode == XK_Right) else if (keycode == XK_Right)
data->player.yaw -= ANGLE_SPEED; data->player.yaw -= ROTATION_SPEED;
if (data->player.yaw > 2 * M_PI) if (data->player.yaw > 2 * M_PI)
data->player.yaw -= 2 * M_PI; data->player.yaw -= 2 * M_PI;
if (data->player.yaw < 0) if (data->player.yaw < 0)