From 5068210318c574eb40715eb0f87d84230b9393df Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sun, 8 Mar 2020 16:48:40 +0100 Subject: At least it compiles --- src/ft_draw_verline.c | 1 + src/ft_raycasting.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index 3d0fea3..dd7697a 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -40,6 +40,7 @@ static void dist_player = 0.0; while ((uint32_t)y < cl->wlist.y_size) { + ft_floor_cast(cl); curr_dist = cl->wlist.y_size / (2.0 * y - cl->wlist.y_size); weight = (curr_dist - dist_player) / (cl->rlist.wall_dist - dist_player); diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index 0a4b8b5..c83604f 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -117,7 +117,6 @@ void 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