diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2020-02-17 16:27:35 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2020-02-17 16:27:35 +0100 |
commit | 8a89388d397b50f2c70cef05f8fa6cfa10cc213c (patch) | |
tree | e010e46998fd02717135f60a6f03ec97f9b47f8d /src/ft_tex_init.c | |
parent | Merge branch 'master' of https://gitlab.com/JozanLeClerc/42-cub3d into tex_fmoen (diff) | |
download | 42-cub3d-8a89388d397b50f2c70cef05f8fa6cfa10cc213c.tar.gz 42-cub3d-8a89388d397b50f2c70cef05f8fa6cfa10cc213c.tar.bz2 42-cub3d-8a89388d397b50f2c70cef05f8fa6cfa10cc213c.tar.xz 42-cub3d-8a89388d397b50f2c70cef05f8fa6cfa10cc213c.tar.zst 42-cub3d-8a89388d397b50f2c70cef05f8fa6cfa10cc213c.zip |
small but important changes
Diffstat (limited to '')
-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); } |