aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_sprite_tex.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-27 19:20:28 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-27 19:20:28 +0100
commit0c2bb0f610c0af0680b46fc4566a207d59781e4d (patch)
tree986d6dd6a19416593c9b2c043312ffa5d4f0be73 /src/ft_get_sprite_tex.c
parentin progress (diff)
download42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.gz
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.bz2
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.xz
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.zst
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.zip
Switched lists entierly
Diffstat (limited to '')
-rw-r--r--src/ft_get_sprite_tex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_get_sprite_tex.c b/src/ft_get_sprite_tex.c
index 308ff84..4db469a 100644
--- a/src/ft_get_sprite_tex.c
+++ b/src/ft_get_sprite_tex.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
int
-ft_get_sprite_tex(int fd, t_win *wlist)
+ft_get_sprite_tex(int fd, t_cub *clist)
{
char *line;
char **words;
@@ -11,15 +11,15 @@ ft_get_sprite_tex(int fd, t_win *wlist)
if (get_next_line(fd, &line) <= 0 || !(words = ft_split(line, ' ')))
{
ft_memdel(line);
- return (ft_map_error(7, wlist));
+ return (ft_map_error(7, clist));
}
if (!(*words) || ft_strcmp(*words, "S") || !words[1] || words[2])
{
ft_free_words(words, line);
- return (ft_map_error(7, wlist));
+ return (ft_map_error(7, clist));
}
- ft_memdel(wlist->clist->sprite_path);
- if (!(wlist->clist->sprite_path = ft_strdup(*(words + 1))))
+ ft_memdel(clist->sprite_path);
+ if (!(clist->sprite_path = ft_strdup(*(words + 1))))
{
ft_free_words(words, line);
return (-1);