diff options
Diffstat (limited to 'src/ft_floor_cast.c')
-rw-r--r-- | src/ft_floor_cast.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index e9315ed..09e0493 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -77,28 +77,27 @@ static void } void - ft_floor_cast(t_cub *cl) + *ft_floor_cast(void *vargp) { - t_ray *rl; + t_cub *cl; uint16_t x; uint16_t y; - rl = &cl->rlist; + cl = (t_cub *)vargp; y = (cl->wlist.y_size / 2); while (y < cl->wlist.y_size) { - ft_floor_cast_inits(y, rl, cl); + ft_floor_cast_inits(y, &cl->rlist, cl); x = 0; while (x < cl->wlist.x_size) { if (cl->rlist.wall_bz[x] <= y) - { - ft_floor_cast_loop(y, x, rl, cl); - } - rl->x_floor += cl->mlist.x_floor_step; - rl->y_floor += cl->mlist.y_floor_step; + ft_floor_cast_loop(y, x, &cl->rlist, cl); + cl->rlist.x_floor += cl->mlist.x_floor_step; + cl->rlist.y_floor += cl->mlist.y_floor_step; x++; } y++; } + return (0x0); } |