player rotates and moves, rays for raycasting on map
This commit is contained in:
21
srcs/hook/key_is_action_2.c
Normal file
21
srcs/hook/key_is_action_2.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user