aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 16:57:36 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 16:57:36 +0100
commitd4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch)
treed2c5ffb0027860722185bf26b526757360ff1584 /src/ft_init_map.c
parenttweaks (diff)
parentGoing full stack is bav (diff)
download42-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.c12
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);
}