diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 3 | ||||
-rw-r--r-- | src/ft_get_darkness.c | 19 | ||||
-rw-r--r-- | src/ft_init_funptr.c | 1 | ||||
-rw-r--r-- | src/ft_select_get.c | 5 |
5 files changed, 26 insertions, 3 deletions
@@ -40,6 +40,7 @@ SRCS_NAME += ft_get_path_nl.c SRCS_NAME += ft_get_nlvl_pos.c SRCS_NAME += ft_get_player_spawn.c SRCS_NAME += ft_get_music.c +SRCS_NAME += ft_get_darkness.c SRCS_NAME += ft_set_minimap_scale.c SRCS_NAME += ft_check_missing.c SRCS_NAME += ft_check_not_found.c diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 44cb003..7149b4d 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -179,6 +179,7 @@ typedef struct s_map uint8_t ismusic; uint8_t isftex; uint8_t isctex; + uint8_t darklvl; uint8_t scale; uint32_t nlx; uint32_t nly; @@ -199,7 +200,7 @@ typedef struct s_cub int32_t key_input[5]; pid_t mpid; int (*key_ptr[6])(struct s_cub*); - int8_t (*get_ptr[11])(char**, struct s_cub*); + int8_t (*get_ptr[12])(char**, struct s_cub*); struct s_win wlist; struct s_player plist; struct s_map mlist; diff --git a/src/ft_get_darkness.c b/src/ft_get_darkness.c new file mode 100644 index 0000000..e9c3966 --- /dev/null +++ b/src/ft_get_darkness.c @@ -0,0 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_get_darkness.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:28:53 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:28:53 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <cub3d.h> + +int8_t + ft_get_darkness(char **words, t_cub *clist) +{ + return (0); +} diff --git a/src/ft_init_funptr.c b/src/ft_init_funptr.c index 1988cb0..75b3cee 100644 --- a/src/ft_init_funptr.c +++ b/src/ft_init_funptr.c @@ -32,4 +32,5 @@ void clist->get_ptr[8] = ft_get_path_nl; clist->get_ptr[9] = ft_get_tex_nl; clist->get_ptr[10] = ft_get_music; + clist->get_ptr[11] = ft_get_darkness; } diff --git a/src/ft_select_get.c b/src/ft_select_get.c index f4673c0..64ba14b 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -60,7 +60,7 @@ static int8_t ft_get_id(char **words, t_cub *clist) { int8_t ret; - char ref[12][3]; + char ref[13][3]; ft_sprintf(ref[0], "R"); ft_sprintf(ref[1], "NO"); @@ -73,7 +73,8 @@ static int8_t ft_sprintf(ref[8], "L"); ft_sprintf(ref[9], "LT"); ft_sprintf(ref[10], "MU"); - ft_bzero(ref[11], 3); + ft_sprintf(ref[11], "SH"); + ft_bzero(ref[12], 3); if (words[0][0] == ' ' || words[0][0] == '1') return (FT_PARSE_END_RET); ret = 0; |