diff --git a/includes/cub3d.h b/includes/cub3d.h index 3701349..38eb004 100644 --- a/includes/cub3d.h +++ b/includes/cub3d.h @@ -1,3 +1,14 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* cub3d.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: aortigos fd = open(av, O_RDONLY); + if (map->fd == -1) + return (ft_putstr_fd(ERR_INV_FILE, 2), 0); + map->line = get_next_line(map->fd); + if (map->line == NULL) + return (ft_putstr_fd(ERR_EMPTY_FILE, 2), 0); + map->ture = ft_strdup(""); + process_map(map, count); + if (!check_count_textures(map, *count)) + return (freetl(map->ture, map->line, map->fd), 0); + map->ture2d = ft_split(map->ture, '\n'); + if (!map->ture2d) + return (freetl(map->ture, map->line, map->fd), 0); + if (!read_map_(map, *count)) + return (freetl(map->ture, map->line, map->fd), free2d(map->ture2d), 0); + return (freetl(map->ture, map->line, map->fd), 1); +} + +void get_x_y_player(t_data *data) +{ + +} + +int check_extension_map(char *file) +{ + char *str; + + str = ft_strrchr(file, '.'); + return (str && !ft_strcmp(str, ".cub")); +} + +int parsing(int ac, char **av, t_data *data) +{ + +} \ No newline at end of file