Cub3D
 
Loading...
Searching...
No Matches
ft_keys.h File Reference

Header file for the key used in cub3d. More...

#include <stdbool.h>
Include dependency graph for ft_keys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KEY_ESCAPE   65307
 Keycode for the escape key.
 
#define KEY_ENTER   65293
 Keycode for the enter key.
 
#define KEY_SPACE   32
 Keycode for the space key.
 
#define KEY_ARROW_LEFT   65361
 Keycode for the left key.
 
#define KEY_ARROW_UP   65362
 Keycode for the up key.
 
#define KEY_ARROW_RIGHT   65363
 Keycode for the right key.
 
#define KEY_ARROW_DOWN   65364
 Keycode for the down key.
 
#define KEY_A   97
 Keycode for the A key.
 
#define KEY_W   119
 Keycode for the W key.
 
#define KEY_D   100
 Keycode for the D key.
 
#define KEY_S   115
 Keycode for the S key.
 
#define KEY_C   99
 Keycode for the C key.
 
#define KEY_M   109
 Keycode for the M key.
 
#define KEY_F   102
 Keycode for the F key.
 
#define KEY_V   118
 Keycode for the V key.
 
#define KEY_X   120
 Keycode for the X key.
 

Enumerations

enum  e_movement { MV_UP , MV_LEFT , MV_RIGHT , MV_DOWN }
 Structure used to define the type of movement with directions. More...
 

Functions

bool is_mv_key (enum e_movement expected, int keycode)
 Check if a keycode is a movement key.
 
void set_key (int keycode, t_input *input, bool set)
 Set the input according to the keycode and the set value.
 
void toggle_key (int keycode, t_input *input)
 Toggle the input according to the keycode.
 
void change_fov (t_data *data, int keycode)
 Change the FOV according to the keycode.
 

Detailed Description

Header file for the key used in cub3d.