diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_sprite_extra.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c index f3cdf08..45f0dd5 100644 --- a/src/ft_draw_sprite_extra.c +++ b/src/ft_draw_sprite_extra.c @@ -13,6 +13,7 @@ #include <libft.h> #include <cub3d.h> #include <stdint.h> +#include <stdio.h> #include <stdlib.h> #include <math.h> @@ -49,11 +50,13 @@ void i = 0; j = 0; - while (j < cl->mlist.sprite_var) + while (j < 4) { while (i < cl->mlist.sprite_nbr) { sprite = cl->sprites[j][i]; + sprite.current_sprite = (j == 0) ? 4 : j + 7; + printf("%d\n", j); sprite.spritey = sprite.s_pos_x - (cl->plist.pos_x - 0.5); sprite.spritex = sprite.s_pos_y - (cl->plist.pos_y - 0.5); sprite.invdet = 1.0 / (cl->plist.plane_x * cl->plist.dir_y |