From a25845a1e0c96111f42e96c9c87d33f0c42180bc Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 18 Feb 2020 16:18:09 +0100 Subject: hmmmmmmmmmmm --- src/ft_raycasting.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/ft_raycasting.c') diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index ff73893..9a89dc4 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -71,7 +71,6 @@ void i = 0; wl = cl->wlist; - ft_wall_tex_init(cl); while (i < wl->x_size) { ft_initray(cl, i); -- cgit v1.2.3 From f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Tue, 18 Feb 2020 18:18:01 +0100 Subject: pas loin --- src/ft_raycasting.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ft_raycasting.c') diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index 9a89dc4..3e658e3 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -25,14 +25,14 @@ void clist->rlist.wall_hit_x = clist->plist->pos_x + clist->rlist.wall_dist * clist->rlist.x_ray_dir; clist->rlist.wall_hit_x -= floor(clist->rlist.wall_hit_x); - clist->rlist.tex_x = (int)(clist->rlist.wall_hit_x * + clist->tlist[clist->w_side].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->tlist[clist->w_side].tex_x = clist->tlist[clist->w_side].img_w + - clist->tlist[clist->w_side].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; + clist->tlist[clist->w_side].tex_x = clist->tlist[clist->w_side].img_w + - clist->tlist[clist->w_side].tex_x - 1; } static void -- cgit v1.2.3 From 01ce065c54d205b1d8432eebfa350f57e6f6c3a8 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Wed, 19 Feb 2020 16:34:13 +0100 Subject: yes :^) ! --- src/ft_raycasting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ft_raycasting.c') diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index 3e658e3..394d6dc 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -26,7 +26,7 @@ void clist->rlist.wall_dist * clist->rlist.x_ray_dir; clist->rlist.wall_hit_x -= floor(clist->rlist.wall_hit_x); clist->tlist[clist->w_side].tex_x = (int)(clist->rlist.wall_hit_x * - (double)clist->tlist[clist->w_side].img_w); + (double)clist->tlist[clist->w_side].img_w); if (clist->rlist.side == 0 && clist->rlist.x_ray_dir > 0) clist->tlist[clist->w_side].tex_x = clist->tlist[clist->w_side].img_w - clist->tlist[clist->w_side].tex_x - 1; @@ -83,7 +83,7 @@ void cl->rlist.wall_b = wl->y_size - 1; ft_choose_tex(cl); ft_calc_tex(cl); - ft_draw_verline(cl, i, cl->rlist.wall_t - 1, cl->rlist.wall_b); + ft_draw_verline(cl, i, cl->rlist.wall_t, cl->rlist.wall_b); i++; } } -- cgit v1.2.3