diff options
author | salaaad2 <arthudurant263@gmail.com> | 2020-03-16 19:26:15 +0100 |
---|---|---|
committer | salaaad2 <arthudurant263@gmail.com> | 2020-03-16 19:26:15 +0100 |
commit | b4bee5505af7e0cfb3681ed9b866d51bbc3f2690 (patch) | |
tree | 28862b19c42130990f1e70924b7e611217fbdf70 /src | |
parent | fix norme (diff) | |
download | 42-cub3d-b4bee5505af7e0cfb3681ed9b866d51bbc3f2690.tar.gz 42-cub3d-b4bee5505af7e0cfb3681ed9b866d51bbc3f2690.tar.bz2 42-cub3d-b4bee5505af7e0cfb3681ed9b866d51bbc3f2690.tar.xz 42-cub3d-b4bee5505af7e0cfb3681ed9b866d51bbc3f2690.tar.zst 42-cub3d-b4bee5505af7e0cfb3681ed9b866d51bbc3f2690.zip |
fix norme2
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_sprite.c | 8 | ||||
-rw-r--r-- | src/ft_draw_sprite_extra.c | 2 |
2 files changed, 5 insertions, 5 deletions
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 <math.h> 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) |