#include "fdf.h"

void	pnt_init(t_map *map)
{
	t_pnt 	**arr_pnt;
	t_list	*lst_map;
	int 	i;
	int 	j;

	lst_map = map->lst_map;
	arr_pnt = malloc(sizeof(t_pnt *) * (map->y_max + 1));
	i = 0;
	while (i <= map->y_max)
	{
		j = 0;
		arr_pnt[i] = malloc(sizeof(t_pnt) * (map->x_max + 1));
		while (j <= map->x_max)
		{
			arr_pnt[i][j].z = ((t_vec *)(lst_map->content))->z;
			lst_map = lst_map->next;
			j++;
		}
		i++;
	}
	map->arr_pnt = arr_pnt;
}
