diff options
Diffstat (limited to 'src/ft_draw_sprite.c')
-rw-r--r-- | src/ft_draw_sprite.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c index 66d69e5..d0447f6 100644 --- a/src/ft_draw_sprite.c +++ b/src/ft_draw_sprite.c @@ -33,7 +33,7 @@ static void tmp = cl->mlist.sprite_order[j][it]; cl->mlist.sprite_order[j][it] = cl->mlist.sprite_order[j][it + 1]; cl->mlist.sprite_order[j][it + 1] = tmp; - it = 0; + *i = 0; } } @@ -46,9 +46,9 @@ void it = -1; jt = -1; - while (++jt < cl->mlist.sprite_var) + while (++jt <= cl->mlist.sprite_var) { - while (++it < cl->mlist.sprite_nbr) + while (++it <= cl->mlist.sprite_nbr) { dist_tab[jt][it] = ((cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) * @@ -59,11 +59,19 @@ void } it = -1; } - it = -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); + it = 0; + jt = 0; + while (jt < 3) + { + while (it < 6) + { + ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl); + printf("%d\n", jt); + it++; + } + it = 0; + jt++; + } } static void |