diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-28 16:32:37 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-28 16:32:37 +0100 |
commit | c1f91998d9cf530d86b6e8d2ddfecf06cae43664 (patch) | |
tree | c4b8ce0838786c9b487f36e3282c606ec93d5066 /src/ft_get_sprite_tex.c | |
parent | Got tex (diff) | |
download | 42-cub3d-c1f91998d9cf530d86b6e8d2ddfecf06cae43664.tar.gz 42-cub3d-c1f91998d9cf530d86b6e8d2ddfecf06cae43664.tar.bz2 42-cub3d-c1f91998d9cf530d86b6e8d2ddfecf06cae43664.tar.xz 42-cub3d-c1f91998d9cf530d86b6e8d2ddfecf06cae43664.tar.zst 42-cub3d-c1f91998d9cf530d86b6e8d2ddfecf06cae43664.zip |
Got sprite
Diffstat (limited to 'src/ft_get_sprite_tex.c')
-rw-r--r-- | src/ft_get_sprite_tex.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/ft_get_sprite_tex.c b/src/ft_get_sprite_tex.c deleted file mode 100644 index 8eb9481..0000000 --- a/src/ft_get_sprite_tex.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <libft.h> -#include <cub3d.h> -#include <stdlib.h> - -int -ft_get_sprite(char **words, t_cub *clist) -{ - char *line; - char **words; - - if (get_next_line(fd, &line) <= 0 || !(words = ft_split(line, ' '))) - { - ft_memdel(line); - 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, clist)); - } - ft_memdel(clist->sprite_path); - if (!(clist->sprite_path = ft_strdup(*(words + 1)))) - { - ft_free_words(words, line); - return (-1); - } - ft_free_words(words, line); - return (0); -} |