aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_shoot.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_shoot.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ft_shoot.c b/src/ft_shoot.c
index 01a96fd..1797b2d 100644
--- a/src/ft_shoot.c
+++ b/src/ft_shoot.c
@@ -95,22 +95,19 @@ static void
}
void
- ft_shoot(t_cub *cl, uint16_t i)
+ ft_shoot(t_cub *cl)
{
t_win *wl;
t_player *pl;
wl = &cl->wlist;
pl = &cl->plist;
- pl->cam_x = 2 * i / (float)(wl->x_size) - 1;
cl->rlist.x_ray_pos = pl->pos_y;
cl->rlist.y_ray_pos = pl->pos_x;
- cl->rlist.x_ray_dir = pl->dir_x + pl->plane_x *
- pl->cam_x;
- cl->rlist.y_ray_dir = pl->dir_y + pl->plane_y *
- pl->cam_x;
- cl->rlist.sqx = (int16_t)cl->rlist.x_ray_pos;
- cl->rlist.sqy = (int16_t)cl->rlist.y_ray_pos;
+ cl->rlist.x_ray_dir = pl->dir_x;
+ cl->rlist.y_ray_dir = pl->dir_y;
+ cl->rlist.sqx = (uint64_t)cl->rlist.x_ray_pos;
+ cl->rlist.sqy = (uint64_t)cl->rlist.y_ray_pos;
ft_detection_init_x(cl);
ft_detection_init_y(cl);
ft_hitscan(cl, 0);