diff options
Diffstat (limited to 'src/ft_raycasting.c')
-rw-r--r-- | src/ft_raycasting.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index e2530a1..ff73893 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -13,7 +13,6 @@ #include <libft.h> #include <cub3d.h> #include <stdint.h> -#include <stdio.h> #include <math.h> void @@ -29,15 +28,11 @@ void clist->rlist.tex_x = (int)(clist->rlist.wall_hit_x * (double)clist->tlist[clist->w_side].img_w); if (clist->rlist.side == 0 && clist->rlist.x_ray_dir > 0) - { - clist->rlist.tex_x = clist->tlist[clist->w_side].img_w - clist->rlist.tex_x - 1; - } + clist->rlist.tex_x = clist->tlist[clist->w_side].img_w + - clist->rlist.tex_x - 1; if (clist->rlist.side == 1 && clist->rlist.y_ray_dir < 0) - { - clist->rlist.tex_x = clist->tlist[clist->w_side].img_w - clist->rlist.tex_x - 1; - } - printf("wall_hit_x : %f\ntex_x : %d\nimg_w : %d\n", - clist->rlist.wall_hit_x, clist->rlist.tex_x, clist->tlist[clist->w_side].img_w); + clist->rlist.tex_x = clist->tlist[clist->w_side].img_w + - clist->rlist.tex_x - 1; } static void |