From b4bee5505af7e0cfb3681ed9b866d51bbc3f2690 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 16 Mar 2020 19:26:15 +0100 Subject: fix norme2 --- src/ft_draw_sprite.c | 8 ++++---- src/ft_draw_sprite_extra.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c index 1294738..a196d96 100644 --- a/src/ft_draw_sprite.c +++ b/src/ft_draw_sprite.c @@ -18,10 +18,10 @@ #include static void - ft_sort_sprites_norme(float *dist_tab, uint16_t *i, uint16_t j, t_cub *cl) + ft_sort_sprites_norme(float *dist_tab, uint16_t *i, uint16_t j, t_cub *cl) { uint32_t tmp; - uint32_t it; + uint32_t it; it = *i; tmp = 0; @@ -51,7 +51,7 @@ void while (++it < cl->mlist.sprite_nbr) { dist_tab[jt][it] = - ((cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) * + ((cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) * (cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) + (cl->plist.pos_y - cl->sprites[jt][it].s_pos_y) * (cl->plist.pos_y - cl->sprites[jt][it].s_pos_y)); @@ -60,7 +60,7 @@ void it = -1; } it = -1; - jt = -1; + jt = -1; while (++jt < cl->mlist.sprite_var) while (++it < cl->mlist.sprite_nbr) ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl); diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c index d81913c..523bf3d 100644 --- a/src/ft_draw_sprite_extra.c +++ b/src/ft_draw_sprite_extra.c @@ -63,7 +63,7 @@ void i = 0; j = 0; - ft_sort_sprites(cl); + ft_sort_sprites(cl); while (j < cl->mlist.sprite_var) { while (i < cl->mlist.sprite_nbr) -- cgit v1.2.3