diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_floor_cast.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index a0321d0..1d98e03 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -16,6 +16,13 @@ void ft_floor_cast(uint16_t y, t_cub *cl) { - (void)y; - (void)cl; + t_ray *rl; + + rl = &cl->rlist; + rl->x_f_ray_dir = cl->plist.dir_x - cl->plist.plane_x; + rl->y_f_ray_dir = cl->plist.dir_y - cl->plist.plane_y; + rl->x_f_ray_dir_bis = cl->plist.dir_x + cl->plist.plane_x; + rl->y_f_ray_dir_bis = cl->plist.dir_y + cl->plist.plane_y; + rl->p = y - cl->wlist.y_size / 2; + cl->plist.pos_z = 0.5 * cl->wlist.y_size; } |