diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-24 20:06:05 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-24 20:06:05 +0100 |
commit | b6736a2dc2cead76bd6a619b52d2d18ac3d4029d (patch) | |
tree | ee89b6ac356cb37a7906ff157c1f1908823b9d2b /src/ft_wall_threads.c | |
parent | Norme and merge (diff) | |
download | 42-cub3d-b6736a2dc2cead76bd6a619b52d2d18ac3d4029d.tar.gz 42-cub3d-b6736a2dc2cead76bd6a619b52d2d18ac3d4029d.tar.bz2 42-cub3d-b6736a2dc2cead76bd6a619b52d2d18ac3d4029d.tar.xz 42-cub3d-b6736a2dc2cead76bd6a619b52d2d18ac3d4029d.tar.zst 42-cub3d-b6736a2dc2cead76bd6a619b52d2d18ac3d4029d.zip |
Get normed
Diffstat (limited to 'src/ft_wall_threads.c')
-rw-r--r-- | src/ft_wall_threads.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/ft_wall_threads.c b/src/ft_wall_threads.c new file mode 100644 index 0000000..30aa3b9 --- /dev/null +++ b/src/ft_wall_threads.c @@ -0,0 +1,83 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_wall_threads.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:22:23 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:23:42 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <cub3d.h> +#include <stdint.h> +#include <pthread.h> + +void + *ft_wall_one(void *vargp) +{ + t_cub *cl; + uint16_t i; + + cl = (t_cub *)vargp; + i = 0; + while (i < cl->wlist.x_size / 4) + { + 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 / 4; + while (i < 2 * (cl->wlist.x_size / 4)) + { + 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 / 4); + while (i < 3 * (cl->wlist.x_size / 4)) + { + 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 / 4); + while (i < 4 * (cl->wlist.x_size / 4)) + { + ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_b_tab[i]); + i++; + } + pthread_exit(0x0); + return (0x0); +} |