diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 22:06:00 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 22:06:00 +0100 |
commit | c786ace26fb4a041a43b2149b61c11b1c75ba1ca (patch) | |
tree | 69f33f8a7e67a5f6214a38b15eea3541b317d7d4 /src/ft_floor_cast.c | |
parent | now pthread (diff) | |
download | 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.gz 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.bz2 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.xz 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.tar.zst 42-cub3d-c786ace26fb4a041a43b2149b61c11b1c75ba1ca.zip |
Some threads
Diffstat (limited to 'src/ft_floor_cast.c')
-rw-r--r-- | src/ft_floor_cast.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c index e9315ed..09e0493 100644 --- a/src/ft_floor_cast.c +++ b/src/ft_floor_cast.c @@ -77,28 +77,27 @@ static void } void - ft_floor_cast(t_cub *cl) + *ft_floor_cast(void *vargp) { - t_ray *rl; + t_cub *cl; uint16_t x; uint16_t y; - rl = &cl->rlist; + cl = (t_cub *)vargp; y = (cl->wlist.y_size / 2); while (y < cl->wlist.y_size) { - ft_floor_cast_inits(y, rl, cl); + ft_floor_cast_inits(y, &cl->rlist, cl); x = 0; while (x < cl->wlist.x_size) { if (cl->rlist.wall_bz[x] <= y) - { - ft_floor_cast_loop(y, x, rl, cl); - } - rl->x_floor += cl->mlist.x_floor_step; - rl->y_floor += cl->mlist.y_floor_step; + ft_floor_cast_loop(y, x, &cl->rlist, cl); + cl->rlist.x_floor += cl->mlist.x_floor_step; + cl->rlist.y_floor += cl->mlist.y_floor_step; x++; } y++; } + return (0x0); } |