#include "fdf.h"

void	pnt_init(t_map *map)
{
	int 	i;
	int 	j;
	float 	z;

	map->arr_pnt = malloc(sizeof(t_pnt *) * (map->y_max));
	i = 0;
	while (i < map->y_max)
	{
		map->arr_pnt[i] = malloc(sizeof(t_pnt) * (map->x_max));
		j = 0;
		while (j < map->x_max)
		{
			z = map->arr_vec[i][j].z - map->z_min;
			map->arr_pnt[i][j].z = z;
			first_color(&map->arr_pnt[i][j], z, map);
			j++;
		}
		i++;
	}
}
