aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_raycasting.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-24 15:42:05 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-24 15:42:05 +0100
commit75ce0896f9333f29cbd55f7e80bfad09668f5500 (patch)
treed55069d9dc052fc779aa76c0578c594d579043f6 /src/ft_raycasting.c
parentless threads (diff)
download42-cub3d-75ce0896f9333f29cbd55f7e80bfad09668f5500.tar.gz
42-cub3d-75ce0896f9333f29cbd55f7e80bfad09668f5500.tar.bz2
42-cub3d-75ce0896f9333f29cbd55f7e80bfad09668f5500.tar.xz
42-cub3d-75ce0896f9333f29cbd55f7e80bfad09668f5500.tar.zst
42-cub3d-75ce0896f9333f29cbd55f7e80bfad09668f5500.zip
Norme and merge
Diffstat (limited to 'src/ft_raycasting.c')
-rw-r--r--src/ft_raycasting.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c
index ea27d29..1804118 100644
--- a/src/ft_raycasting.c
+++ b/src/ft_raycasting.c
@@ -104,7 +104,7 @@ static void
void
ft_castray(t_cub *cl)
{
- /* pthread_t tid[2]; */
+ pthread_t tid[2];
uint16_t y;
uint16_t x;
@@ -173,12 +173,10 @@ void
cl->rlist.row_dist_tab[cl->wlist.y_size - y] = cl->rlist.row_dist;
y++;
}
- ft_wall_cast(cl);
- ft_floor_cast(cl);
- /* pthread_create(&tid[0], 0x0, ft_wall_cast, (void*)cl); */
- /* pthread_create(&tid[1], 0x0, ft_floor_cast, (void*)cl); */
- /* pthread_join(tid[0], 0x0); */
- /* pthread_join(tid[1], 0x0); */
+ pthread_create(&tid[0], 0x0, ft_wall_cast, (void*)cl);
+ pthread_create(&tid[1], 0x0, ft_floor_cast, (void*)cl);
+ pthread_join(tid[0], 0x0);
+ pthread_join(tid[1], 0x0);
x = 0;
while (x < 2)
{