aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite_extra.c
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-03-12 15:08:06 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-03-12 15:08:06 +0100
commit176c86dde0c19ffed0d4845003dbcace3f00b9d2 (patch)
tree516524a2d00ec35f223de73a6c1c852a53ee858d /src/ft_draw_sprite_extra.c
parentgang_gang (diff)
download42-cub3d-176c86dde0c19ffed0d4845003dbcace3f00b9d2.tar.gz
42-cub3d-176c86dde0c19ffed0d4845003dbcace3f00b9d2.tar.bz2
42-cub3d-176c86dde0c19ffed0d4845003dbcace3f00b9d2.tar.xz
42-cub3d-176c86dde0c19ffed0d4845003dbcace3f00b9d2.tar.zst
42-cub3d-176c86dde0c19ffed0d4845003dbcace3f00b9d2.zip
3 sprites but gns needs work :^)
Diffstat (limited to '')
-rw-r--r--src/ft_draw_sprite_extra.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c
index c1fa4aa..0f923e7 100644
--- a/src/ft_draw_sprite_extra.c
+++ b/src/ft_draw_sprite_extra.c
@@ -50,13 +50,19 @@ void
i = 0;
j = 0;
- while (j < 3)
+ printf("%d\n", cl->sprites[0][0].s_pos_x);
+ printf("%d\n", cl->sprites[1][0].s_pos_x);
+ printf("%d\n", cl->sprites[2][0].s_pos_x);
+ /* printf("%d\n", cl->sprites[3][0].s_pos_x); */
+ /* cl->sprites[2][0].s_pos_x = 4; */
+ /* cl->sprites[2][0].s_pos_y = 2; */
+ while (j <= cl->mlist.sprite_var)
{
while (i < cl->mlist.sprite_nbr)
{
sprite = cl->sprites[j][i];
sprite.current_sprite = (j == 0) ? 4 : j + 7;
- /* printf("%d\n", sprite.current_sprite); */
+ /* printf("j :%d curr : %d\n", j, sprite.current_sprite); */
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