diff options
Diffstat (limited to 'src/ft_floor_threads.c')
-rw-r--r-- | src/ft_floor_threads.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/ft_floor_threads.c b/src/ft_floor_threads.c index 476bd8e..05f75aa 100644 --- a/src/ft_floor_threads.c +++ b/src/ft_floor_threads.c @@ -26,7 +26,7 @@ void while (y < (cl->wlist.y_size)) { x = 0; - while (x < cl->wlist.x_size / 4) + while (x < cl->wlist.x_size / 5) { if (cl->rlist.wall_b_tab[x] <= y) ft_floor_cast_loop(y, x, cl); @@ -49,8 +49,8 @@ void y = (cl->wlist.y_size / 2); while (y < (cl->wlist.y_size)) { - x = cl->wlist.x_size / 4; - while (x < 2 * (cl->wlist.x_size / 4)) + x = cl->wlist.x_size / 5; + while (x < 2 * (cl->wlist.x_size / 5)) { if (cl->rlist.wall_b_tab[x] <= y) ft_floor_cast_loop(y, x, cl); @@ -73,8 +73,8 @@ void y = (cl->wlist.y_size / 2); while (y < (cl->wlist.y_size)) { - x = 2 * (cl->wlist.x_size / 4); - while (x < 3 * (cl->wlist.x_size / 4)) + x = 2 * (cl->wlist.x_size / 5); + while (x < 3 * (cl->wlist.x_size / 5)) { if (cl->rlist.wall_b_tab[x] <= y) ft_floor_cast_loop(y, x, cl); @@ -97,8 +97,32 @@ void y = (cl->wlist.y_size / 2); while (y < (cl->wlist.y_size)) { - x = 3 * (cl->wlist.x_size / 4); - while (x < 4 * (cl->wlist.x_size / 4)) + x = 3 * (cl->wlist.x_size / 5); + while (x < 4 * (cl->wlist.x_size / 5)) + { + if (cl->rlist.wall_b_tab[x] <= y) + ft_floor_cast_loop(y, x, cl); + x++; + } + y++; + } + pthread_exit(0x0); + return (0x0); +} + +void + *ft_floor_five(void *vargp) +{ + uint16_t x; + uint16_t y; + t_cub *cl; + + cl = (t_cub *)vargp; + y = (cl->wlist.y_size / 2); + while (y < (cl->wlist.y_size)) + { + x = 4 * (cl->wlist.x_size / 5); + while (x < 5 * (cl->wlist.x_size / 5)) { if (cl->rlist.wall_b_tab[x] <= y) ft_floor_cast_loop(y, x, cl); |