#include #include #include int ft_missing_error(const char *err, t_cub *clist) { ft_dprintf(STDERR_FILENO, "Error\n"); ft_dprintf(STDERR_FILENO, "\033[1;31mMissing element: %s\033[0m\n", err); return (ft_exit(1, clist)); } int ft_check_missing(t_cub *clist) { if (!clist->no_tex_path) return (ft_missing_error("north side texture", clist)); else if (!clist->so_tex_path) return (ft_missing_error("south side texture", clist)); else if (!clist->ea_tex_path) return (ft_missing_error("east side texture", clist)); else if (!clist->we_tex_path) return (ft_missing_error("west side texture", clist)); else if (clist->wlist->x_size < 0 || clist->wlist->y_size < 0) return (ft_missing_error("resolution", clist)); else if (clist->f_color < 0) return (ft_missing_error("floor color", clist)); else if (clist->c_color < 0) return (ft_missing_error("ceiling color", clist)); return (0); }