diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-27 15:44:12 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-27 15:44:33 +0100 |
commit | a4342816383dd39666bb6007210eb38b6819469a (patch) | |
tree | 7f7f07dd5e4777bcea1720f91377ff239f7aa80b /src/ft_wall_threads.c | |
parent | test map update (diff) | |
download | 42-cub3d-a4342816383dd39666bb6007210eb38b6819469a.tar.gz 42-cub3d-a4342816383dd39666bb6007210eb38b6819469a.tar.bz2 42-cub3d-a4342816383dd39666bb6007210eb38b6819469a.tar.xz 42-cub3d-a4342816383dd39666bb6007210eb38b6819469a.tar.zst 42-cub3d-a4342816383dd39666bb6007210eb38b6819469a.zip |
Five threads for compat
Diffstat (limited to 'src/ft_wall_threads.c')
-rw-r--r-- | src/ft_wall_threads.c | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/ft_wall_threads.c b/src/ft_wall_threads.c index 30aa3b9..4855da6 100644 --- a/src/ft_wall_threads.c +++ b/src/ft_wall_threads.c @@ -22,9 +22,10 @@ void cl = (t_cub *)vargp; i = 0; - while (i < cl->wlist.x_size / 4) + while (i < cl->wlist.x_size / 5) { - ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + ft_draw_verline(cl, i, + cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); i++; } pthread_exit(0x0); @@ -38,10 +39,11 @@ void uint16_t i; cl = (t_cub *)vargp; - i = cl->wlist.x_size / 4; - while (i < 2 * (cl->wlist.x_size / 4)) + i = cl->wlist.x_size / 5; + while (i < 2 * (cl->wlist.x_size / 5)) { - ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + ft_draw_verline(cl, i, + cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); i++; } pthread_exit(0x0); @@ -55,10 +57,11 @@ void uint16_t i; cl = (t_cub *)vargp; - i = 2 * (cl->wlist.x_size / 4); - while (i < 3 * (cl->wlist.x_size / 4)) + i = 2 * (cl->wlist.x_size / 5); + while (i < 3 * (cl->wlist.x_size / 5)) { - ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + ft_draw_verline(cl, i, + cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); i++; } pthread_exit(0x0); @@ -72,10 +75,29 @@ void uint16_t i; cl = (t_cub *)vargp; - i = 3 * (cl->wlist.x_size / 4); - while (i < 4 * (cl->wlist.x_size / 4)) + i = 3 * (cl->wlist.x_size / 5); + while (i < 4 * (cl->wlist.x_size / 5)) { - ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + ft_draw_verline(cl, i, + cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + i++; + } + pthread_exit(0x0); + return (0x0); +} + +void + *ft_wall_five(void *vargp) +{ + t_cub *cl; + uint16_t i; + + cl = (t_cub *)vargp; + i = 4 * (cl->wlist.x_size / 5); + while (i < 5 * (cl->wlist.x_size / 5)) + { + ft_draw_verline(cl, i, + cl->rlist.wall_t_tab[i],cl->rlist.wall_b_tab[i]); i++; } pthread_exit(0x0); |