aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_floor_cast.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-24 20:06:05 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-24 20:06:05 +0100
commitb6736a2dc2cead76bd6a619b52d2d18ac3d4029d (patch)
treeee89b6ac356cb37a7906ff157c1f1908823b9d2b /src/ft_floor_cast.c
parentNorme and merge (diff)
download42-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_floor_cast.c')
-rw-r--r--src/ft_floor_cast.c99
1 files changed, 1 insertions, 98 deletions
diff --git a/src/ft_floor_cast.c b/src/ft_floor_cast.c
index c9c44e5..3962431 100644
--- a/src/ft_floor_cast.c
+++ b/src/ft_floor_cast.c
@@ -43,7 +43,7 @@ static void
(y * cl->img.sizeline))) = ft_rgb_to_hex(dist, rgb, cl);
}
-static void
+void
ft_floor_cast_loop(uint16_t y, uint16_t x, t_cub *cl)
{
if (cl->mlist.isftex)
@@ -61,103 +61,6 @@ static void
}
void
-*ft_floor_one(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 = 0;
- while (x < cl->wlist.x_size / 4)
- {
- if (cl->rlist.wall_bz[x] <= y)
- ft_floor_cast_loop(y, x, cl);
- x++;
- }
- y++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-void
-*ft_floor_two(void *vargp)
-{
- uint16_t x;
- uint16_t y;
- t_cub *cl;
-
- cl = (t_cub *)vargp;
- y = (cl->wlist.y_size / 2);
- /* y += 1 * (cl->wlist.y_size / 2 / 4); */
- while (y < (cl->wlist.y_size))
- {
- x = cl->wlist.x_size / 4;
- while (x < 2 * (cl->wlist.x_size / 4))
- {
- if (cl->rlist.wall_bz[x] <= y)
- ft_floor_cast_loop(y, x, cl);
- x++;
- }
- y++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-void
-*ft_floor_three(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 = 2 * (cl->wlist.x_size / 4);
- while (x < 3 * (cl->wlist.x_size / 4))
- {
- if (cl->rlist.wall_bz[x] <= y)
- ft_floor_cast_loop(y, x, cl);
- x++;
- }
- y++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-void
-*ft_floor_four(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 = 3 * (cl->wlist.x_size / 4);
- while (x < 4 * (cl->wlist.x_size / 4))
- {
- if (cl->rlist.wall_bz[x] <= y)
- ft_floor_cast_loop(y, x, cl);
- x++;
- }
- y++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-void
*ft_floor_cast(void *vargp)
{
pthread_t tid[4];