diff options
Diffstat (limited to 'src/ft_sort_s_t.c')
-rw-r--r-- | src/ft_sort_s_t.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ft_sort_s_t.c b/src/ft_sort_s_t.c index bcf033f..f51437e 100644 --- a/src/ft_sort_s_t.c +++ b/src/ft_sort_s_t.c @@ -21,12 +21,12 @@ float uint16_t i; float **dist_tab; - if (!(dist_tab = (float **)malloc((FT_TOTAL_SPRT + 1) * sizeof(float*)))) + if (!(dist_tab = (float **)ft_calloc((FT_TOTAL_SPRT + 1), sizeof(float*)))) return (NULL); i = 0; while (i < FT_TOTAL_SPRT + 1) { - if (!(dist_tab[i] = (float *)malloc(4096 * sizeof(float)))) + if (!(dist_tab[i] = (float *)ft_calloc(4096, sizeof(float)))) return (NULL); i++; } @@ -67,11 +67,11 @@ static void i = 0; j = 0; k = 0; + ft_printf("%d %d %d %d %d %d %d %d\n", (int32_t)dist_tab[8][0], (int32_t)dist_tab[8][1], (int32_t)dist_tab[8][2], (int32_t)dist_tab[8][3], (int32_t)dist_tab[8][4], (int32_t)dist_tab[8][5], (int32_t)dist_tab[8][6], (int32_t)dist_tab[8][7]); while (i < cl->big_t_val) { if (dist_tab[j][k]) { - ft_printf("%d\n", j); cl->big_t[i][0] = dist_tab[j][k]; cl->big_t[i][1] = (float)ft_set_current_sprite(cl, j); cl->big_t[i][2] = (float)j; @@ -95,6 +95,7 @@ static void j = -1; i = -1; + (void)dist_tab; while (++i < FT_TOTAL_SPRT) st_o[i] = -1; i = -1; @@ -103,7 +104,7 @@ static void if (cl->mlist.sprite_nbr[i] > 0) { st_o[++j] = i; - ft_memcpy(dist_tab[j], dist_tab[i], 4096 * sizeof(float)); + /* ft_memcpy(dist_tab[j], dist_tab[i], 4096 * sizeof(float)); */ } } } |