diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 00:09:11 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 00:09:11 +0100 |
commit | fbd69257b509d3374573282ee08f5d9fc9ed4095 (patch) | |
tree | 28b9ab225e910a8ae279623b08152e310431242c /src/main.c | |
parent | Nice and working (diff) | |
download | 42-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.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); |