From c1d1d76e0c88fbbbe4b1e0611a13a6a4df6cb424 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:59:17 +0100 Subject: Parsed traps --- inc/cub3d.h | 1 + inc/cub3d_defines.h | 9 +++++---- inc/cub3d_structs.h | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'inc') diff --git a/inc/cub3d.h b/inc/cub3d.h index e351fa9..bb30122 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -102,6 +102,7 @@ int8_t ft_get_c_tex(char **words, t_cub *clist); int8_t ft_get_darkness(char **words, t_cub *clist); int8_t ft_get_path_nl(char **words, t_cub *clist); int8_t ft_get_skybox(char **words, t_cub *clist); +int8_t ft_get_traps(char **words, t_cub *clist); int8_t ft_get_tex_nl(char **words, t_cub *clist); int8_t ft_get_music(char **words, t_cub *clist); size_t ft_get_map_h(char **map); diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index edc3dec..6453e73 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -114,11 +114,11 @@ enum ** ====== CHARSET ====== */ -# define FT_CHRST_VALID_PARSE "RNSEWFCLM" -# define FT_CHRST_MAP_ENTRY "012NSEWL " +# define FT_CHRST_VALID_PARSE "RNSEWFCLMT" +# define FT_CHRST_MAP_ENTRY "012NSEWLT " # define FT_CHRST_SPAWN "NSEW" -# define FT_CHRST_MAP_NON_WALL "02NESWL" -# define FT_CHRST_COLLISION "12 " +# define FT_CHRST_MAP_NON_WALL "02NESWLT" +# define FT_CHRST_COLLISION "12T " # define FT_CHRST_DETECT "1L" /* @@ -166,6 +166,7 @@ enum # define FT_ERR_RD_NL_TEX "could not find next level texture file" # define FT_ERR_RD_NL_MAP "could not find next level map file" # define FT_ERR_RD_MUSIC "could not find music file" +# define FT_ERR_RD_TRAP "could not find trap texture file" # define FT_ERR_WR_BMP "could not export to bmp" /* diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 9f48975..89e531a 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -214,8 +214,8 @@ typedef struct s_cub int32_t key_input[5]; pid_t mpid; int (*key_ptr[6])(struct s_cub*); - int8_t (*get_ptr[13])(char**, struct s_cub*); - char ref[14][3]; + int8_t (*get_ptr[14])(char**, struct s_cub*); + char ref[15][3]; struct s_win wlist; struct s_player plist; struct s_map mlist; @@ -225,7 +225,7 @@ typedef struct s_cub struct s_rgb c_rgb; struct s_img tlist[16]; struct s_sprite sprites[4096]; - struct s_sprite traps[4096]; + struct s_sprite traps[512]; } t_cub; # endif -- cgit v1.2.3