#include "fdf.h" int **parse_map(t_fdf *fdf) { int **map; int i; int j; map = ft_calloc(10, sizeof(map)); i = -1; while (++i < 10) { map[i] = ft_calloc(15, sizeof(*map)); j = -1; while(++j < 15) map[i][j] = 0; } map[9][0] = 1; map[9][1] = 2; map[9][2] = 3; map[9][3] = 4; map[9][4] = 5; map[9][5] = 6; map[9][6] = 7; map[9][7] = 8; map[9][8] = 9; map[9][9] = 10; map[9][10] = 2; map[9][11] = 5; map[9][12] = 8; map[9][13] = 3; map[9][14] = 6; fdf->max_z = 10; fdf->map_width = j; fdf->map_height = i; return (map); }