diff options
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r-- | src/ft_tex_init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index aba5338..fc0a9dd 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -13,6 +13,8 @@ #include <cub3d.h> #include <stdint.h> #include <mlx.h> +#include <stdio.h> +#include <libft.h> /* * 0 : no @@ -22,6 +24,22 @@ * 4 : sprite **/ +void ft_puttex(t_cub *clist) +{ + int i; + + i = 0; + while (i < clist->tlist[0].img_w) + { + printf("no : img : %p data : %s, height : %d i : %d\n", clist->tlist[0].img, clist->tlist[0].ptr + i, clist->tlist[0].img_w, i / 4); + i += 4; + } + printf("%d\n", clist->w_side); + /*printf("so : img : %p data : %x, height : %d\n", clist->tlist[1].img, (unsigned int)clist->tlist[1].ptr, clist->tlist[1].img_w);*/ + /*printf("ea : img : %p data : %x, height : %d\n", clist->tlist[2].img, (unsigned int)clist->tlist[2].ptr, clist->tlist[2].img_w);*/ + /*printf("we : img : %p data : %x, height : %d\n", clist->tlist[3].img, (unsigned int)clist->tlist[3].ptr, clist->tlist[3].img_w);*/ +} + void ft_wall_tex_init(t_cub *clist) { clist->tlist[0].img = mlx_xpm_file_to_image(clist->wlist->wlx, @@ -44,4 +62,5 @@ void ft_wall_tex_init(t_cub *clist) clist->mlist->sprite_path, &clist->tlist[4].img_w, &clist->tlist[4].img_h); clist->tlist[4].ptr = mlx_get_data_addr(clist->tlist[4].img, &clist->tlist[4].bpp, &clist->tlist[4].sizeline, &clist->tlist[4].endian); + ft_puttex(clist); } |