aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_raycasting.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_raycasting.c')
-rw-r--r--src/ft_raycasting.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c
index 7ce45d5..26a3ec9 100644
--- a/src/ft_raycasting.c
+++ b/src/ft_raycasting.c
@@ -26,7 +26,8 @@ void
clist->rlist.wall_hit_x = clist->plist->pos_x +
clist->rlist.wall_dist * clist->rlist.x_ray_dir;
clist->rlist.wall_hit_x -= floor(clist->rlist.wall_hit_x);
- /*clist->rlist.tex_x =(int)(clist->rlist.wall_hit_x * clist->tlist[clist->w_side].img_w);*/
+ clist->rlist.tex_x = (clist->rlist.wall_hit_x * (double)clist->tlist[clist->w_side].img_w);
+ printf("wall_hit_x : %f\ntex_x : %d\nimg_w : %d\n", clist->rlist.wall_hit_x, clist->rlist.tex_x, clist->tlist[clist->w_side].img_w);
}
static void
@@ -65,6 +66,7 @@ void
i = 0;
wl = cl->wlist;
+ ft_wall_tex_init(cl);
while (i < wl->x_size)
{
ft_initray(cl, i);