diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-12 23:47:37 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-12 23:47:37 +0100 |
commit | a2f0bde9da402ddfd47ec54d42b83585c3296ebf (patch) | |
tree | ff99c82f9a31064617953607eacd56fd1a862827 /inc | |
parent | Secured traps (diff) | |
download | 42-cub3d-a2f0bde9da402ddfd47ec54d42b83585c3296ebf.tar.gz 42-cub3d-a2f0bde9da402ddfd47ec54d42b83585c3296ebf.tar.bz2 42-cub3d-a2f0bde9da402ddfd47ec54d42b83585c3296ebf.tar.xz 42-cub3d-a2f0bde9da402ddfd47ec54d42b83585c3296ebf.tar.zst 42-cub3d-a2f0bde9da402ddfd47ec54d42b83585c3296ebf.zip |
Secured parsing
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d.h | 1 | ||||
-rw-r--r-- | inc/cub3d_defines.h | 6 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index c08a994..2103295 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -118,6 +118,7 @@ int8_t ft_check_ext(const char *filep, const char *ext); int8_t ft_check_not_found(const char *path); int ft_get_map_first_line(char *line, t_cub *clist); int ft_get_map_core(int fd, t_cub *clist); +void ft_get_topsp(char c, t_cub *clist); void ft_check_map_surrounds(t_map *ml, t_cub *cl); int ft_check_missing(t_cub *clist); int ft_missing_error(const char *err, t_cub *clist); diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 12c8580..2fbd325 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -26,7 +26,8 @@ enum FT_RET_MAP_ERR, FT_RET_NO_MAP, FT_RET_READ_ERR, - FT_RET_BMP_ERR + FT_RET_BMP_ERR, + FT_ERR_MISSING } retvals; /* @@ -116,8 +117,9 @@ enum # define FT_CHRST_VALID_PARSE "RNSEWFCLMT" # define FT_CHRST_MAP_ENTRY "0123456789NSEWLT " +# define FT_CHRST_SPRITES "23456789" # define FT_CHRST_SPAWN "NSEW" -# define FT_CHRST_MAP_NON_WALL "02NESWLT" +# define FT_CHRST_MAP_NON_WALL "023456789NESWLT" # define FT_CHRST_COLLISION "123456789 " # define FT_CHRST_DETECT "1L" diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index d0e0845..dd652ee 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -198,6 +198,7 @@ typedef struct s_map uint8_t istraps; uint8_t darklvl; uint8_t scale; + int8_t topsp; uint32_t nlx; uint32_t nly; float x_floor_step; |