diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 20:09:07 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 20:09:07 +0100 |
commit | 2cf0485db50f566354cdfdef20214b2c0a4e1dca (patch) | |
tree | 21285f994ff8ab2b68cd5834191224c519a63767 /src/ft_init_lists.c | |
parent | map update (diff) | |
download | 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.gz 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.bz2 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.xz 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.tar.zst 42-cub3d-2cf0485db50f566354cdfdef20214b2c0a4e1dca.zip |
Clean norme
Diffstat (limited to 'src/ft_init_lists.c')
-rw-r--r-- | src/ft_init_lists.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index ec46713..8cea58b 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -42,7 +42,7 @@ static t_player return (plist); } -t_win +static t_win *ft_init_win(void) { t_win *wlist; @@ -60,7 +60,7 @@ t_win return (wlist); } -t_cub +static t_cub *ft_init_cub(void) { t_cub *clist; @@ -87,3 +87,23 @@ t_cub clist->c_rgb = ft_init_rgb(); return (clist); } + +int8_t + ft_init_cub3d(t_cub **cl) +{ + t_cub *clist; + + if (!(clist = ft_init_cub())) + { + ft_memdel((void**)&clist); + return (-1); + } + if (!(clist->wlist = ft_init_win())) + { + ft_memdel((void**)&clist->wlist); + ft_memdel((void**)&clist); + return (-1); + } + *cl = clist; + return (0); +} |