aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite_extra.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_sprite_extra.c6
1 files changed, 4 insertions, 2 deletions
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 <cub3d.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
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]];