This commit is contained in:
Leo Firmin
2025-10-05 06:31:06 +02:00
parent 8eea3162d5
commit a3e025e6b9
57 changed files with 189 additions and 11 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ typedef struct s_data
//////utils/////
//utils
void ft_error(char *message);
void free_char_array(char **array);
void free_char_array(char **array);
int ft_arrlen(char **arr);
//init
int init_data(t_data *data, char *path);
void free_data(t_data *data);
+7 -2
View File
@@ -20,7 +20,12 @@
#define ERROR_INIT_PARS "Initialization of the parsing structure failed."
#define ERROR_EMPTY "You have provided an empty file."
#define ERROR_COL "The RGB values provided are not valid."
#define ERROR_NULL_P "Player not found or multiple players."
#define ERROR_BAD_CHAR "Invalid character in map."
#define ERROR_POS "Player position not found."
#define ERROR_ALLOC "Allocation failed."
#define ERROR_PLAYER "Player not found or multiple players."
#define ERROR_CHAR "Invalid character in map."
#define ERROR_NOT_CLOSE "Map is not closed by walls."
#define DEBUG "test"
#endif
+4
View File
@@ -36,6 +36,7 @@ typedef struct s_data_parsing
char **raw_map;
int fd_map;
int fd_map_dup;
int player[3];
} t_data_parsing;
//parsing
@@ -69,4 +70,7 @@ int get_rgb_values(char *line, int rgb[3]);
//check_colors
int check_colors(t_textures *texture);
int is_rgb(int color[3]);
// check_mao
int validate_map(char **map, int *player);
#endif