diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 16:57:36 +0100 |
commit | d4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch) | |
tree | d2c5ffb0027860722185bf26b526757360ff1584 /src/ft_init_map.c | |
parent | tweaks (diff) | |
parent | Going full stack is bav (diff) | |
download | 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.gz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.bz2 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.xz 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.zst 42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.zip |
Merge branch 'bmp'
Diffstat (limited to '')
-rw-r--r-- | src/ft_init_map.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ft_init_map.c b/src/ft_init_map.c index c611ba2..a6704b6 100644 --- a/src/ft_init_map.c +++ b/src/ft_init_map.c @@ -34,15 +34,11 @@ static int8_t return (0); } -t_map - *ft_init_map(void) +int8_t + ft_init_map(t_map *mlist) { - t_map *mlist; - - if (!(mlist = (t_map*)malloc(sizeof(t_map)))) - return (NULL); if (ft_init_map_callocs(mlist) < 0) - return (NULL); + return (-1); mlist->map[1] = 0; mlist->map_w = 0; mlist->map_h = 0; @@ -56,5 +52,5 @@ t_map mlist->scale = 0; mlist->nlx = 0; mlist->nly = 0; - return (mlist); + return (0); } |