aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_parse_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 17:57:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 17:57:20 +0100
commit6776a1f3491663c85480326e0d01f9a6c5455bbd (patch)
tree035435a20e933c43b192552a5b3f766fe55131e5 /src/ft_parse_map.c
parentft_split redone (diff)
download42-cub3d-6776a1f3491663c85480326e0d01f9a6c5455bbd.tar.gz
42-cub3d-6776a1f3491663c85480326e0d01f9a6c5455bbd.tar.bz2
42-cub3d-6776a1f3491663c85480326e0d01f9a6c5455bbd.tar.xz
42-cub3d-6776a1f3491663c85480326e0d01f9a6c5455bbd.tar.zst
42-cub3d-6776a1f3491663c85480326e0d01f9a6c5455bbd.zip
Tons of changes
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r--src/ft_parse_map.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index 60726a2..f4eb4f0 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -9,17 +9,18 @@
*/
void
-ft_parse_map(t_win *wlist, t_cub *clist, const char *map_path)
+ft_parse_map(t_win *wlist, const char *map_path)
{
int fd;
- (void)clist;
fd = open(map_path, O_RDONLY);
if (fd < 0)
{
ft_dprintf(STDERR_FILENO, "Error\n");
ft_dprintf(STDERR_FILENO, "\033[31;1mNo map\033[0m\n");
- ft_exit(2);
+ ft_exit(2, wlist);
}
ft_get_res(fd, wlist);
+ if (ft_get_tex(fd, wlist) < 0)
+ return ;
}