1
0

🚧」 test: testing things, might broke.

This commit is contained in:
Maelys
2024-09-28 20:48:32 +02:00
parent a6929e15e1
commit 073fd2f2ff
20 changed files with 778 additions and 215 deletions

View File

@ -6,7 +6,7 @@
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/04 17:01:05 by madumerg #+# #+# */
/* Updated: 2024/09/15 20:43:25 by madumerg ### ########.fr */
/* Updated: 2024/09/28 15:55:04 by madumerg ### ########.fr */
/* */
/* ************************************************************************** */
@ -23,5 +23,4 @@
# include <stdio.h>
# include "parsing.h"
#endif

View File

@ -6,10 +6,13 @@
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/04 21:59:56 by madumerg #+# #+# */
/* Updated: 2024/09/16 12:18:42 by madumerg ### ########.fr */
/* Updated: 2024/09/28 16:52:46 by madumerg ### ########.fr */
/* */
/* ************************************************************************** */
//general
#define CRASH "Memory problems or open failed"
//for argurments
#define ERR_ARGS "Wrong number of arguments"
@ -22,9 +25,14 @@
#define ERR_PLAYER "Incorrect number of players"
#define WRONG_CHAR "Invalid character in the map"
//for permission
//for information map
#define ERR_IMG "Problem with image"
#define WRONG_F_IMG "Wrong type of image"
#define DUP_ACR "There is a duplicate acronym"
#define DUP_IMG "There is a duplicate image"
#define NOT_FOUND "Information searched is not complete"
#define ERR_COLOR "The number is not between 0 and 255"
#define DUP_COLOR "Impossible to have the same color on the floor and ceiling"
#define WRONG_F_RGB "Wrong format RGB"
#define INVALID_CHAR "Invalid character in format color"

View File

@ -6,7 +6,7 @@
/* By: madumerg <madumerg@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/12 12:49:16 by madumerg #+# #+# */
/* Updated: 2024/09/16 14:23:15 by madumerg ### ########.fr */
/* Updated: 2024/09/28 17:54:07 by madumerg ### ########.fr */
/* */
/* ************************************************************************** */
@ -23,11 +23,14 @@ typedef struct s_pars
{
int f_color;
int c_color;
int color;
char l_player;
t_coord coor;
char *no_png;
char *so_png;
char *we_png;
char *ea_png;
char **map;
} t_pars;
//check_arg.c
@ -35,32 +38,63 @@ 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);
//check_image.c
int assign_img(char *sign, char *path, t_pars *pars);
int check_dup_img(t_pars *pars);
int check_texture(char *sign, char *path, t_pars *pars);
//check_map.c
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);
int check_format_rgb(char *sign, char **tab, t_pars *pars);
//color_utils.c
int create_argb(int r, int g, int b);
char *ft_strndup_color(char *src, int start, int end);
int check_char_color(char *tab);
int check_dup_color(t_pars *pars);
//find_player.c
int search_letter(char **map, int i, char l);
int count_player(char **map, t_pars *pars, int ct);
//principal_pars.c
int verif_info_file(char *av, t_pars *pars);
int verif_all_map(char **map);
char **parse_map(char *map);
int verif_all_map(char **map, t_pars *pars);
char **parse_file(char *map, int ct, int i);
//mess_error.c in utils
int err_mess(char *str);
//parse_utils.c
char **info_map(char **file);
void convert_white_s(char *str);
int verif_char(char c);
int count_tab(char **tab);
int space_line(char *line);
//parse_utils_two.c
int ft_count_line_map(char **map, int y);
void replace_nl(char *l);
int recup_map(char **old_map, int i, t_pars *pars);
int all_skip(char **map, t_pars *pars);
//parse_utils_three.c
char **alloc_map(char **old_map, int size);
char *fill_line(char *l, int size);
int last_first_line(char **map);
//utils.c
int count_tab(char **tab);
void convert_white_s(char *str);
int longest_line(char **line);
int count_line_file(int fd);
//clear_free.c
void free_tab(char **tab);
void free_pars(t_pars *pars);
#endif