diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 14:47:33 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 14:47:33 +0100 |
commit | 8866ef5699150d0549096efa94fc311ff7a48dc7 (patch) | |
tree | 4a03267f7e7f9b399a9ad0536b50ba6a90407e47 /src/ft_tex_init.c | |
parent | Music is pretty bav (diff) | |
download | 42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.gz 42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.bz2 42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.xz 42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.tar.zst 42-cub3d-8866ef5699150d0549096efa94fc311ff7a48dc7.zip |
Changing stuff
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r-- | src/ft_tex_init.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index 6e12a56..0dafd05 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -27,36 +27,36 @@ static void ft_get_nlvl_img(t_cub *cl) { - cl->tlist[5].img = mlx_xpm_file_to_image(cl->wlist->wlx, - cl->mlist->nl_tex_path, &cl->tlist[5].img_w, &cl->tlist[5].img_h); - cl->tlist[5].ptr = mlx_get_data_addr(cl->tlist[5].img, - &cl->tlist[5].bpp, &cl->tlist[5].sizeline, &cl->tlist[5].endian); + cl.tlist[5].img = mlx_xpm_file_to_image(cl.wlist.wlx, + cl.mlist.nl_tex_path, &cl.tlist[5].img_w, &cl.tlist[5].img_h); + cl.tlist[5].ptr = mlx_get_data_addr(cl.tlist[5].img, + &cl.tlist[5].bpp, &cl.tlist[5].sizeline, &cl.tlist[5].endian); } void ft_wall_tex_init(t_cub *cl) { - cl->tlist[0].img = mlx_xpm_file_to_image(cl->wlist->wlx, - cl->mlist->no_tex_path, &cl->tlist[0].img_w, &cl->tlist[0].img_h); - cl->tlist[0].ptr = mlx_get_data_addr(cl->tlist[0].img, - &cl->tlist[0].bpp, &cl->tlist[0].sizeline, &cl->tlist[0].endian); - cl->tlist[1].img = mlx_xpm_file_to_image(cl->wlist->wlx, - cl->mlist->so_tex_path, &cl->tlist[1].img_w, &cl->tlist[1].img_h); - cl->tlist[1].ptr = mlx_get_data_addr(cl->tlist[1].img, - &cl->tlist[1].bpp, &cl->tlist[1].sizeline, &cl->tlist[1].endian); - cl->tlist[2].img = mlx_xpm_file_to_image(cl->wlist->wlx, - cl->mlist->ea_tex_path, &cl->tlist[2].img_w, &cl->tlist[2].img_h); - cl->tlist[2].ptr = mlx_get_data_addr(cl->tlist[2].img, - &cl->tlist[2].bpp, &cl->tlist[2].sizeline, &cl->tlist[2].endian); - cl->tlist[3].img = mlx_xpm_file_to_image(cl->wlist->wlx, - cl->mlist->we_tex_path, &cl->tlist[3].img_w, &cl->tlist[3].img_h); - cl->tlist[3].ptr = mlx_get_data_addr(cl->tlist[3].img, - &cl->tlist[3].bpp, &cl->tlist[3].sizeline, &cl->tlist[3].endian); - cl->tlist[4].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[4].ptr = mlx_get_data_addr(cl->tlist[4].img, - &cl->tlist[4].bpp, &cl->tlist[4].sizeline, &cl->tlist[4].endian); - if (cl->mlist->isnlvl) + cl.tlist[0].img = mlx_xpm_file_to_image(cl.wlist.wlx, + cl.mlist.no_tex_path, &cl.tlist[0].img_w, &cl.tlist[0].img_h); + cl.tlist[0].ptr = mlx_get_data_addr(cl.tlist[0].img, + &cl.tlist[0].bpp, &cl.tlist[0].sizeline, &cl.tlist[0].endian); + cl.tlist[1].img = mlx_xpm_file_to_image(cl.wlist.wlx, + cl.mlist.so_tex_path, &cl.tlist[1].img_w, &cl.tlist[1].img_h); + cl.tlist[1].ptr = mlx_get_data_addr(cl.tlist[1].img, + &cl.tlist[1].bpp, &cl.tlist[1].sizeline, &cl.tlist[1].endian); + cl.tlist[2].img = mlx_xpm_file_to_image(cl.wlist.wlx, + cl.mlist.ea_tex_path, &cl.tlist[2].img_w, &cl.tlist[2].img_h); + cl.tlist[2].ptr = mlx_get_data_addr(cl.tlist[2].img, + &cl.tlist[2].bpp, &cl.tlist[2].sizeline, &cl.tlist[2].endian); + cl.tlist[3].img = mlx_xpm_file_to_image(cl.wlist.wlx, + cl.mlist.we_tex_path, &cl.tlist[3].img_w, &cl.tlist[3].img_h); + cl.tlist[3].ptr = mlx_get_data_addr(cl.tlist[3].img, + &cl.tlist[3].bpp, &cl.tlist[3].sizeline, &cl.tlist[3].endian); + cl.tlist[4].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[4].ptr = mlx_get_data_addr(cl.tlist[4].img, + &cl.tlist[4].bpp, &cl.tlist[4].sizeline, &cl.tlist[4].endian); + if (cl.mlist.isnlvl) ft_get_nlvl_img(cl); - cl->walltexgood = 1; + cl.walltexgood = 1; } |