aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_floor_cast.c10
-rw-r--r--src/ft_raycasting.c6
2 files changed, 10 insertions, 6 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c
index ddc7bde..a0321d0 100644
--- a/src/ft_floor_cast.c
+++ b/src/ft_floor_cast.c
@@ -13,7 +13,9 @@
#include <cub3d.h>
#include <stdint.h>
-/* void */
-/* ft_floor_cast(t_cub *cl) */
-/* { */
-/* } */
+void
+ ft_floor_cast(uint16_t y, t_cub *cl)
+{
+ (void)y;
+ (void)cl;
+}
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)