aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_raycasting.c
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-02-19 16:34:13 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-02-19 16:34:13 +0100
commit01ce065c54d205b1d8432eebfa350f57e6f6c3a8 (patch)
treeb2e7cd17c26595d2f2bbd71be3291f455a5cfdcb /src/ft_raycasting.c
parentokok (diff)
download42-cub3d-01ce065c54d205b1d8432eebfa350f57e6f6c3a8.tar.gz
42-cub3d-01ce065c54d205b1d8432eebfa350f57e6f6c3a8.tar.bz2
42-cub3d-01ce065c54d205b1d8432eebfa350f57e6f6c3a8.tar.xz
42-cub3d-01ce065c54d205b1d8432eebfa350f57e6f6c3a8.tar.zst
42-cub3d-01ce065c54d205b1d8432eebfa350f57e6f6c3a8.zip
yes :^) !
Diffstat (limited to 'src/ft_raycasting.c')
-rw-r--r--src/ft_raycasting.c4
1 files changed, 2 insertions, 2 deletions
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++;
}
}