aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_detect.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 16:57:36 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 16:57:36 +0100
commitd4f853942aa2031c4bd85539ef9f3470967ffdc5 (patch)
treed2c5ffb0027860722185bf26b526757360ff1584 /src/ft_detect.c
parenttweaks (diff)
parentGoing full stack is bav (diff)
download42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.gz
42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.bz2
42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.xz
42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.tar.zst
42-cub3d-d4f853942aa2031c4bd85539ef9f3470967ffdc5.zip
Merge branch 'bmp'
Diffstat (limited to '')
-rw-r--r--src/ft_detect.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ft_detect.c b/src/ft_detect.c
index a8b5a6c..8ab3d57 100644
--- a/src/ft_detect.c
+++ b/src/ft_detect.c
@@ -22,13 +22,13 @@ static void
cl->rlist.y_ray_dir));
if (cl->rlist.y_ray_dir < 0)
{
- cl->mlist->y_step = -1;
+ cl->mlist.y_step = -1;
cl->rlist.y_side_dist = (cl->rlist.y_ray_pos -
cl->rlist.sqy) * cl->rlist.y_delta_dist;
}
else
{
- cl->mlist->y_step = 1;
+ cl->mlist.y_step = 1;
cl->rlist.y_side_dist = (cl->rlist.sqy + 1.0 -
cl->rlist.y_ray_pos) * cl->rlist.y_delta_dist;
}
@@ -42,13 +42,13 @@ static void
cl->rlist.x_ray_dir));
if (cl->rlist.x_ray_dir < 0)
{
- cl->mlist->x_step = -1;
+ cl->mlist.x_step = -1;
cl->rlist.x_side_dist = (cl->rlist.x_ray_pos -
cl->rlist.sqx) * cl->rlist.x_delta_dist;
}
else
{
- cl->mlist->x_step = 1;
+ cl->mlist.x_step = 1;
cl->rlist.x_side_dist = (cl->rlist.sqx + 1.0 -
cl->rlist.x_ray_pos) * cl->rlist.x_delta_dist;
}
@@ -65,17 +65,17 @@ void
if (cl->rlist.x_side_dist < cl->rlist.y_side_dist)
{
cl->rlist.x_side_dist += cl->rlist.x_delta_dist;
- cl->rlist.sqx += cl->mlist->x_step;
+ cl->rlist.sqx += cl->mlist.x_step;
cl->rlist.side = 0;
}
else
{
cl->rlist.y_side_dist += cl->rlist.y_delta_dist;
- cl->rlist.sqy += cl->mlist->y_step;
+ cl->rlist.sqy += cl->mlist.y_step;
cl->rlist.side = 1;
}
- if (cl->mlist->map[cl->rlist.sqx][cl->rlist.sqy] == '1' ||
- cl->mlist->map[cl->rlist.sqx][cl->rlist.sqy] == 'L')
+ if (cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] == '1' ||
+ cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] == 'L')
cl->rlist.hit = 1;
}
}