From 36c540d12683633b77f6acda658fe4517eb674a5 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sun, 8 Mar 2020 20:44:41 +0100 Subject: Clean af --- src/ft_raycasting.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ft_raycasting.c') 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) -- cgit v1.2.3