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