diff options
author | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-02-14 19:56:54 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-02-14 19:56:54 +0100 |
commit | 80f3c817c2be9e6632cf567138590675f0a372b7 (patch) | |
tree | f5bbefff944373c3febb580e0a5af08276d938ec /inc | |
parent | Norme, removed key events debug printf (diff) | |
download | 42-cub3d-80f3c817c2be9e6632cf567138590675f0a372b7.tar.gz 42-cub3d-80f3c817c2be9e6632cf567138590675f0a372b7.tar.bz2 42-cub3d-80f3c817c2be9e6632cf567138590675f0a372b7.tar.xz 42-cub3d-80f3c817c2be9e6632cf567138590675f0a372b7.tar.zst 42-cub3d-80f3c817c2be9e6632cf567138590675f0a372b7.zip |
New define .h
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d.h | 31 | ||||
-rw-r--r-- | inc/cub3d_defines.h | 56 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 3 |
3 files changed, 61 insertions, 29 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 699dc6a..386f658 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -13,37 +13,10 @@ # ifndef CUB3D_H # define CUB3D_H +#include <cub3d_defines.h> +#include <cub3d_structs.h> #include <stddef.h> #include <stdint.h> -#include <cub3d_structs.h> - -# ifndef FT_W_KEY -# define FT_W_KEY 13 -# endif -# ifndef FT_A_KEY -# define FT_A_KEY 0 -# endif -# ifndef FT_S_KEY -# define FT_S_KEY 1 -# endif -# ifndef FT_D_KEY -# define FT_D_KEY 2 -# endif -# ifndef FT_L_ARR_KEY -# define FT_L_ARR_KEY 123 -# endif -# ifndef FT_R_ARR_KEY -# define FT_R_ARR_KEY 124 -# endif -# ifndef FT_ESC_KEY -# define FT_ESC_KEY 53 -# endif -# ifndef FT_F1_KEY -# define FT_F1_KEY 122 -# endif -# ifndef FT_SCR_SIZE -# define FT_SCR_SIZE "1920x1080" -# endif /* ** ret vals: diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h new file mode 100644 index 0000000..b129206 --- /dev/null +++ b/inc/cub3d_defines.h @@ -0,0 +1,56 @@ +# ifndef CUB3D_DEFINES_H +# define CUB3D_DEFINES_H + +/* +** ====== KEYS ====== +*/ + +# ifndef FT_W_KEY +# define FT_W_KEY 13 +# endif +# ifndef FT_A_KEY +# define FT_A_KEY 0 +# endif +# ifndef FT_S_KEY +# define FT_S_KEY 1 +# endif +# ifndef FT_D_KEY +# define FT_D_KEY 2 +# endif +# ifndef FT_L_ARR_KEY +# define FT_L_ARR_KEY 123 +# endif +# ifndef FT_R_ARR_KEY +# define FT_R_ARR_KEY 124 +# endif +# ifndef FT_ESC_KEY +# define FT_ESC_KEY 53 +# endif +# ifndef FT_F1_KEY +# define FT_F1_KEY 122 +# endif + +/* +** ====== SCREEN ====== +*/ + +# ifndef FT_SCR_SIZE +# define FT_SCR_SIZE "1920x1080" +# endif + +/* +** ====== ERROR MSG ====== +*/ + +# define FT_ERR_MISS_ELEMENT "Missing element:" +# define FT_ERR_MISS_NORTH "north side texture" +# define FT_ERR_MISS_SOUTH "south side texture" +# define FT_ERR_MISS_EAST "east side texture" +# define FT_ERR_MISS_WEST "west side texture" +# define FT_ERR_MISS_SPRITE "sprite texture" +# define FT_ERR_MISS_RESOLUTION "resolution" +# define FT_ERR_MISS_FLOOR_C "floor color" +# define FT_ERR_MISS_CEIL_C "floor color" +# define FT_ERR_MISS_PLAYER_SPAWN "player spawn" + +# endif diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index eab9b7e..9dae0be 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -13,6 +13,9 @@ # ifndef CUB3D_STRUCTS_H # define CUB3D_STRUCTS_H +#include <stddef.h> +#include <stdint.h> + typedef struct s_win { void *wlx; |