aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
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);