aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_raycasting.c
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-02-18 18:18:01 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-02-18 18:18:01 +0100
commitf8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d (patch)
tree53fb6c5cea4b793f1619ed0dd5a3d76dfc910081 /src/ft_raycasting.c
parenthmmmmmmmmmmm (diff)
download42-cub3d-f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d.tar.gz
42-cub3d-f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d.tar.bz2
42-cub3d-f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d.tar.xz
42-cub3d-f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d.tar.zst
42-cub3d-f8cd383a3ed07be0fb3ad78ad25a0c053c53ae3d.zip
pas loin
Diffstat (limited to 'src/ft_raycasting.c')
-rw-r--r--src/ft_raycasting.c10
1 files changed, 5 insertions, 5 deletions
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