aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_raycasting.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_raycasting.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c
index 78c8bb4..1c5818a 100644
--- a/src/ft_raycasting.c
+++ b/src/ft_raycasting.c
@@ -112,12 +112,14 @@ void
uint16_t i;
t_win *wl;
- i = 0;
wl = &cl->wlist;
+ i = (wl->y_size / 2) + 1;
+ while (++i < wl->y_size)
+ ft_floor_cast(i, cl);
+ i = 0;
while (i < wl->x_size)
{
ft_initray(i, cl);
- /* ft_floor_cast(cl); */
cl->rlist.line_h = (int16_t)(wl->y_size / cl->rlist.wall_dist);
cl->rlist.wall_t = -cl->rlist.line_h / 2 + wl->y_size / 2;
if (cl->rlist.wall_t < 0)