42_cub3d/include/input.h
mcolonna 26621c72c6 docs, clean, several things... *
- add docs
- remove unused things
- redo modifications i accidentally erased from spacetime
2024-11-07 01:03:05 +01:00

47 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* input.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mc <mc@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/17 14:43:09 by mcolonna #+# #+# */
/* Updated: 2024/11/01 20:59:28 by mc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INPUT_H
# define INPUT_H
# include "include.h"
/// @brief For g_input_actions
typedef struct s_input_actions
{
bool left;
bool right;
bool up;
bool down;
bool quit;
} t_input_actions;
/// @brief Modified by the input of the user. A value becomes true
/// when the user presses the corresponding key.
extern t_input_actions g_input_actions;
/// @brief To call when a specific key is newly pressed.
///
/// @param keycode Key pressed.
/// @return Unused.
int hook_keypress(int keycode);
/// @brief To call when a specific key is released.
///
/// @param keycode Key released.
/// @return Unused.
int hook_keyrelease(int keycode);
/// @brief To call at the start of the program.
void input_init(void);
#endif