/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* asset.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet mlx, name, &dimmension, &dimmension); free(name); return (img); } int ft_gen_assets(t_data *data) { char **colors; size_t i; colors = ft_split(COLORS, '|'); if (colors == NULL) return (1); i = 0; while (i < NB_COLORS) { data->assets[i] = ft_gen_asset(colors[i], CASE_SIZE, data); if (data->assets[i] == NULL) return (1); i++; } data->assets[NB_COLORS] = ft_gen_asset(colors[i], WINDOW_SIZE, data); if (data->assets[NB_COLORS] == NULL) return (1); ft_freer_tab_ultimate(1, colors); return (0); }