diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |