map fits window

This commit is contained in:
hugogogo
2021-07-25 12:51:15 +02:00
parent 4d3fc2779c
commit c06489fd99
13 changed files with 152 additions and 73 deletions

View File

@@ -15,10 +15,14 @@ int **split_to_map(t_fdf *fdf, char *raw)
int **map;
map = ft_calloc(fdf->map_height, sizeof(map));
if (!map)
shut_down(fdf);
i = -1;
while (++i < fdf->map_height)
{
map[i] = ft_calloc(fdf->map_width, sizeof(*map));
if (!map[i])
shut_down(fdf);
j = -1;
while (++j < fdf->map_width)
{