diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_draw_scene.c | 2 | ||||
-rw-r--r-- | src/ft_draw_verline.c | 3 | ||||
-rw-r--r-- | src/ft_raycasting.c | 1 | ||||
-rw-r--r-- | src/main.c | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c index ec2cc89..60198e9 100644 --- a/src/ft_draw_scene.c +++ b/src/ft_draw_scene.c @@ -18,7 +18,7 @@ void ft_draw_scene(t_cub *clist) { - mlx_clear_window(clist->wlist->wlx, clist->wlist->winptr); + /*mlx_clear_window(clist->wlist->wlx, clist->wlist->winptr);*/ clist->img.img = mlx_new_image(clist->wlist->wlx, clist->wlist->x_size, clist->wlist->y_size); clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp, diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index 0fad33a..0b97cc5 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -60,7 +60,8 @@ int8_t ft_choose_tex(cl); while (y <= y2) { - *(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = (cl->rlist.side) ? 0x0000eeaa : 0x0000ffaa; + cl->rlist.step_tex_v = 1.0 * cl->tlist[clist->w_side].img_w - cl->rlist.line_h; + /**(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = (cl->rlist.side) ? 0x2200ffaa : 0x0000ffaa;*/ y++; } ft_draw_floor(cl, y, x); diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index ff73893..9a89dc4 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -71,7 +71,6 @@ void i = 0; wl = cl->wlist; - ft_wall_tex_init(cl); while (i < wl->x_size) { ft_initray(cl, i); @@ -31,6 +31,7 @@ int ft_parse_map(argv[1], clist); if (ft_init_winlx(clist) < 0) return (ft_exit(3, clist)); + ft_wall_tex_init(clist); ft_draw_scene(clist); ft_hooks_and_loops(clist->wlist, clist); return (0); |