42_cub3d/include/input.h
2024-10-31 16:06:33 +01:00

35 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* input.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/17 14:43:09 by mcolonna #+# #+# */
/* Updated: 2024/10/17 14:59:41 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INPUT_H
# define INPUT_H
# include <stdbool.h>
/// @brief Modified by the input of the user. A value becomes true
/// when the user presses the corresponding key.
typedef struct s_input_actions
{
bool left;
bool right;
bool up;
bool down;
bool quit;
} t_input_actions;
extern t_input_actions g_input_actions;
int keypress(int keycode);
int keyrelease(int keycode);
void input_init(void);
#endif