player rotates and moves, rays for raycasting on map

This commit is contained in:
Hugo LAMY
2022-04-18 18:27:16 +02:00
parent 00b3612c16
commit 01eb2255d2
21 changed files with 689 additions and 138 deletions

View File

@@ -0,0 +1,21 @@
#include "cube3d.h"
int is_turn_left(int *k_hook, int *is_action)
{
if (!ft_arrintchr(k_hook, ARROW_LEFT, MAX_NB_KEY))
{
*is_action = 1;
return 1;
}
return 0;
}
int is_turn_right(int *k_hook, int *is_action)
{
if (!ft_arrintchr(k_hook, ARROW_RIGHT, MAX_NB_KEY))
{
*is_action = 1;
return 1;
}
return 0;
}