aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 00:09:11 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 00:09:11 +0100
commitfbd69257b509d3374573282ee08f5d9fc9ed4095 (patch)
tree28b9ab225e910a8ae279623b08152e310431242c /src/main.c
parentNice and working (diff)
download42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.gz
42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.bz2
42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.xz
42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.tar.zst
42-cub3d-fbd69257b509d3374573282ee08f5d9fc9ed4095.zip
It ain't much but it's honest work
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d23320b..c252bca 100644
--- a/src/main.c
+++ b/src/main.c
@@ -9,9 +9,12 @@ int
t_win *wlist;
t_cub *clist;
- wlist = ft_init_win();
- clist = ft_init_cub();
+ if (!(wlist = ft_init_win())
+ || !(clist = ft_init_cub()))
+ return (ft_exit(4));
ft_parse_map(wlist, clist, "map/map_one.cub");
+ if (ft_init_winlx(wlist) < 0)
+ return (ft_exit(3));
mlx_key_hook(wlist->winptr, ft_key_event, wlist);
ft_drawsquare(wlist, clist, 80, 80);
mlx_loop(wlist->wlx);