38 lines
1.3 KiB
C
38 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* asset.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/01/06 14:23:00 by cchauvet #+# #+# */
|
|
/* Updated: 2023/01/10 18:21:06 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "solong.h"
|
|
|
|
int ft_gen_assets(void)
|
|
{
|
|
char **colors;
|
|
t_square square;
|
|
size_t i;
|
|
|
|
colors = ft_split(COLORS, '|');
|
|
if (colors == NULL)
|
|
return (1);
|
|
i = 0;
|
|
while (colors[i] != NULL)
|
|
{
|
|
square.color = colors[i];
|
|
square.size = CASE_SIZE;
|
|
ft_xpm_gen_file(square);
|
|
square.color = colors[i];
|
|
square.size = WINDOW_SIZE;
|
|
ft_xpm_gen_file(square);
|
|
i++;
|
|
}
|
|
ft_freer_tab_ultimate(1, colors);
|
|
return (0);
|
|
}
|