1
0
cub3d/includes/parsing.h

67 lines
1.9 KiB
C
Raw Normal View History

2024-09-12 13:01:04 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parsing.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/12 12:49:16 by madumerg #+# #+# */
2024-09-16 15:09:07 +02:00
/* Updated: 2024/09/16 14:23:15 by madumerg ### ########.fr */
2024-09-12 13:01:04 +02:00
/* */
/* ************************************************************************** */
#ifndef PARSING_H
# define PARSING_H
2024-09-12 17:00:27 +02:00
typedef struct s_coord
{
int x;
int y;
} t_coord;
typedef struct s_pars
{
2024-09-16 15:09:07 +02:00
int f_color;
int c_color;
2024-09-12 17:00:27 +02:00
t_coord coor;
2024-09-16 15:09:07 +02:00
char *no_png;
char *so_png;
char *we_png;
char *ea_png;
2024-09-12 17:00:27 +02:00
} t_pars;
2024-09-12 13:01:04 +02:00
//check_arg.c
2024-09-16 15:09:07 +02:00
int check_err_arg(int ac, char **av);
int check_format_file(char *file);
//check_id_text.c
int check_texture(char *sign, char *path, t_pars *pars);
int detect_info(char **tab, t_pars *pars);
int check_dup_img(t_pars *pars);
2024-09-12 13:01:04 +02:00
//check_map.c
2024-09-16 15:09:07 +02:00
int err_not_close(char after, char before, char down, char up);
int actual_char(char actual);
int check_map_close(char **map);
int count_player(char **map);
int check_char_map(char **map);
//check_rgb.c
int check_format_rgb(char **tab);
2024-09-12 13:01:04 +02:00
//principal_pars.c
2024-09-16 15:09:07 +02:00
int verif_info_file(char *av, t_pars *pars);
int verif_all_map(char **map);
2024-09-12 13:01:04 +02:00
char **parse_map(char *map);
//mess_error.c in utils
2024-09-16 15:09:07 +02:00
int err_mess(char *str);
2024-09-12 13:01:04 +02:00
//parse_utils.c
2024-09-12 17:00:27 +02:00
char **info_map(char **file);
2024-09-12 13:01:04 +02:00
void convert_white_s(char *str);
2024-09-16 15:09:07 +02:00
int verif_char(char c);
int count_tab(char **tab);
int space_line(char *line);
2024-09-12 13:01:04 +02:00
#endif