From 8fa58fb7a2a363534468ddbb0f0dafe6f577b3fd Mon Sep 17 00:00:00 2001 From: salad Date: Sat, 28 Mar 2020 15:50:34 +0100 Subject: ez --- src/ft_draw_sprite_extra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ft_draw_sprite_extra.c') diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c index da7a37b..4599ff4 100644 --- a/src/ft_draw_sprite_extra.c +++ b/src/ft_draw_sprite_extra.c @@ -12,6 +12,7 @@ #include #include +#include #include void @@ -71,10 +72,11 @@ void i = -1; j = -1; ft_sort_sprites(cl, -1, -1); - while (++j < FT_TOTAL_SPRT) + while (++j < 9) { - while (cl->mlist.st_o[j] != -1 && ++i < cl->mlist.sprite_nbr[j]) + while (++i < cl->mlist.sprite_nbr[cl->mlist.st_o[j]] && cl->mlist.st_o[j] != -1 ) { + /* printf("j : %d tab : [%d]\n", j, cl->mlist.st_o[j]); */ sprite = cl->sprites[cl->mlist.st_o[j]][cl->mlist.sprite_order[ cl->mlist.st_o[j]][i]]; -- cgit v1.2.3