aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-03-09 21:11:08 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-03-09 21:11:08 +0100
commitb780107eb1fdf57b65d9bd664613de6835f9b962 (patch)
tree295440e8bcd730c806089e3c571216f8b346d55d
parentget next sprite (diff)
download42-cub3d-b780107eb1fdf57b65d9bd664613de6835f9b962.tar.gz
42-cub3d-b780107eb1fdf57b65d9bd664613de6835f9b962.tar.bz2
42-cub3d-b780107eb1fdf57b65d9bd664613de6835f9b962.tar.xz
42-cub3d-b780107eb1fdf57b65d9bd664613de6835f9b962.tar.zst
42-cub3d-b780107eb1fdf57b65d9bd664613de6835f9b962.zip
small changez, supposed to work, TODO
Diffstat (limited to '')
-rw-r--r--src/ft_get_sprite.c1
-rw-r--r--src/ft_tex_init.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ft_get_sprite.c b/src/ft_get_sprite.c
index 8174cae..c288b67 100644
--- a/src/ft_get_sprite.c
+++ b/src/ft_get_sprite.c
@@ -25,6 +25,7 @@ void
x = 1;
y = 1;
i = 0;
+ clist->mlist.sprite_var++;
while (clist->mlist.map[y])
{
while (clist->mlist.map[y][x])
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index 38e4c77..9daa20d 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -51,6 +51,10 @@ static void
cl->mlist.ce_tex_path, &cl->tlist[7].img_w, &cl->tlist[7].img_h);
cl->tlist[7].ptr = mlx_get_data_addr(cl->tlist[7].img,
&cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian);
+ cl->tlist[8].img = mlx_xpm_file_to_image(cl->wlist.wlx,
+ cl->mlist.sprite_path, &cl->tlist[4].img_w, &cl->tlist[4].img_h);
+ cl->tlist[8].ptr = mlx_get_data_addr(cl->tlist[8].img,
+ &cl->tlist[8].bpp, &cl->tlist[8].sizeline, &cl->tlist[8].endian);
}
static void