aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_sprite.c
blob: f1fa73f2b80b678b3c90515f6ccf645ca0f54856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <libft.h>
#include <cub3d.h>

int
ft_get_sprite(char **words, t_cub *clist)
{
	if (!(*words) || !words[1] || words[2])
		return (-1);
	ft_memdel(clist->sprite_path);
	if (!(clist->sprite_path = ft_strdup(*(words + 1))))
		return (-1);
	ft_printf("{%s}\n", clist->sprite_path);
	return (0);
}