colors gradient is fonctionning

This commit is contained in:
asus
2024-01-11 16:53:16 +01:00
parent c54a0a1a63
commit fe23ce3f31
8 changed files with 2751 additions and 37 deletions

View File

@@ -24,7 +24,7 @@ int *new_coordinates(t_fdf *fdf, int i, int j)
int height;
int *point;
point = ft_calloc(3, sizeof(int));
point = ft_calloc(4, sizeof(int));
x = i * (fdf->offset + fdf->zoom);
y = j * (fdf->offset + fdf->zoom);
x -= (fdf->map_size_x + fdf->zoom * fdf->map_width) / 2;
@@ -45,6 +45,7 @@ int *new_coordinates(t_fdf *fdf, int i, int j)
point[0] += (fdf->map_size_x + fdf->zoom * fdf->map_width) / 2;
point[1] += (fdf->map_size_y + fdf->zoom * fdf->map_height) / 2;
point[2] = z;
point[3] = fdf->map[j][i];
return (point);
}