/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_wall_threads.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: joelecle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:22:23 by joelecle #+# #+# */ /* Updated: 2020/02/14 17:23:42 by joelecle ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include void *ft_wall_one(void *vargp) { t_cub *cl; uint16_t i; cl = (t_cub *)vargp; i = 0; while (i < 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); return (0x0); } void *ft_wall_two(void *vargp) { t_cub *cl; uint16_t i; cl = (t_cub *)vargp; 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]); i++; } pthread_exit(0x0); return (0x0); } void *ft_wall_three(void *vargp) { t_cub *cl; uint16_t i; cl = (t_cub *)vargp; 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]); i++; } pthread_exit(0x0); return (0x0); } void *ft_wall_four(void *vargp) { t_cub *cl; uint16_t i; cl = (t_cub *)vargp; 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]); 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); return (0x0); }