aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_wall_cast.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 22:31:15 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-23 22:31:15 +0100
commit5ad03a84ee06712ef4331a173c710657da70d0d0 (patch)
treebc5cef668090ea62ddff826ca9f89dabaeedd50f /src/ft_wall_cast.c
parentSome threads (diff)
download42-cub3d-5ad03a84ee06712ef4331a173c710657da70d0d0.tar.gz
42-cub3d-5ad03a84ee06712ef4331a173c710657da70d0d0.tar.bz2
42-cub3d-5ad03a84ee06712ef4331a173c710657da70d0d0.tar.xz
42-cub3d-5ad03a84ee06712ef4331a173c710657da70d0d0.tar.zst
42-cub3d-5ad03a84ee06712ef4331a173c710657da70d0d0.zip
got work to do
Diffstat (limited to 'src/ft_wall_cast.c')
-rw-r--r--src/ft_wall_cast.c164
1 files changed, 82 insertions, 82 deletions
diff --git a/src/ft_wall_cast.c b/src/ft_wall_cast.c
index b10d2a6..0a1a8ef 100644
--- a/src/ft_wall_cast.c
+++ b/src/ft_wall_cast.c
@@ -43,7 +43,7 @@ static void
cl = (t_cub *)vargp;
i = 0;
- while (i < cl->wlist.x_size / 8)
+ while (i < cl->wlist.x_size / 4)
{
ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]);
i++;
@@ -59,8 +59,8 @@ static void
uint16_t i;
cl = (t_cub *)vargp;
- i = cl->wlist.x_size / 8;
- while (i < 2 * (cl->wlist.x_size / 8))
+ 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_bz[i]);
i++;
@@ -76,8 +76,8 @@ static void
uint16_t i;
cl = (t_cub *)vargp;
- i = 2 * (cl->wlist.x_size / 8);
- while (i < 3 * (cl->wlist.x_size / 8))
+ 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_bz[i]);
i++;
@@ -93,8 +93,8 @@ static void
uint16_t i;
cl = (t_cub *)vargp;
- i = 3 * (cl->wlist.x_size / 8);
- while (i < 4 * (cl->wlist.x_size / 8))
+ 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_bz[i]);
i++;
@@ -103,73 +103,73 @@ static void
return (0x0);
}
-static void
-*ft_wall_five(void *vargp)
-{
- t_cub *cl;
- uint16_t i;
-
- cl = (t_cub *)vargp;
- i = 4 * (cl->wlist.x_size / 8);
- while (i < 5 * (cl->wlist.x_size / 8))
- {
- ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]);
- i++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-static void
-*ft_wall_six(void *vargp)
-{
- t_cub *cl;
- uint16_t i;
-
- cl = (t_cub *)vargp;
- i = 5 * (cl->wlist.x_size / 8);
- while (i < 6 * (cl->wlist.x_size / 8))
- {
- ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]);
- i++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-static void
-*ft_wall_seven(void *vargp)
-{
- t_cub *cl;
- uint16_t i;
-
- cl = (t_cub *)vargp;
- i = 6 * (cl->wlist.x_size / 8);
- while (i < 7 * (cl->wlist.x_size / 8))
- {
- ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]);
- i++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
-
-static void
-*ft_wall_eight(void *vargp)
-{
- t_cub *cl;
- uint16_t i;
-
- cl = (t_cub *)vargp;
- i = 7 * (cl->wlist.x_size / 8);
- while (i < cl->wlist.x_size)
- {
- ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]);
- i++;
- }
- pthread_exit(0x0);
- return (0x0);
-}
+/* static void */
+/* *ft_wall_five(void *vargp) */
+/* { */
+/* t_cub *cl; */
+/* uint16_t i; */
+
+/* cl = (t_cub *)vargp; */
+/* i = 4 * (cl->wlist.x_size / 8); */
+/* while (i < 5 * (cl->wlist.x_size / 8)) */
+/* { */
+/* ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]); */
+/* i++; */
+/* } */
+/* pthread_exit(0x0); */
+/* return (0x0); */
+/* } */
+
+/* static void */
+/* *ft_wall_six(void *vargp) */
+/* { */
+/* t_cub *cl; */
+/* uint16_t i; */
+
+/* cl = (t_cub *)vargp; */
+/* i = 5 * (cl->wlist.x_size / 8); */
+/* while (i < 6 * (cl->wlist.x_size / 8)) */
+/* { */
+/* ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]); */
+/* i++; */
+/* } */
+/* pthread_exit(0x0); */
+/* return (0x0); */
+/* } */
+
+/* static void */
+/* *ft_wall_seven(void *vargp) */
+/* { */
+/* t_cub *cl; */
+/* uint16_t i; */
+
+/* cl = (t_cub *)vargp; */
+/* i = 6 * (cl->wlist.x_size / 8); */
+/* while (i < 7 * (cl->wlist.x_size / 8)) */
+/* { */
+/* ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]); */
+/* i++; */
+/* } */
+/* pthread_exit(0x0); */
+/* return (0x0); */
+/* } */
+
+/* static void */
+/* *ft_wall_eight(void *vargp) */
+/* { */
+/* t_cub *cl; */
+/* uint16_t i; */
+
+/* cl = (t_cub *)vargp; */
+/* i = 7 * (cl->wlist.x_size / 8); */
+/* while (i < cl->wlist.x_size) */
+/* { */
+/* ft_draw_verline(cl, i, cl->rlist.wall_t_tab[i], cl->rlist.wall_bz[i]); */
+/* i++; */
+/* } */
+/* pthread_exit(0x0); */
+/* return (0x0); */
+/* } */
void
*ft_wall_cast(void *vargp)
@@ -182,18 +182,18 @@ void
pthread_create(&tid[1], 0x0, ft_wall_two, (void*)cl);
pthread_create(&tid[2], 0x0, ft_wall_three, (void*)cl);
pthread_create(&tid[3], 0x0, ft_wall_four, (void*)cl);
- pthread_create(&tid[4], 0x0, ft_wall_five, (void*)cl);
- pthread_create(&tid[5], 0x0, ft_wall_six, (void*)cl);
- pthread_create(&tid[6], 0x0, ft_wall_seven, (void*)cl);
- pthread_create(&tid[7], 0x0, ft_wall_eight, (void*)cl);
+ /* pthread_create(&tid[4], 0x0, ft_wall_five, (void*)cl); */
+ /* pthread_create(&tid[5], 0x0, ft_wall_six, (void*)cl); */
+ /* pthread_create(&tid[6], 0x0, ft_wall_seven, (void*)cl); */
+ /* pthread_create(&tid[7], 0x0, ft_wall_eight, (void*)cl); */
pthread_join(tid[0], 0x0);
pthread_join(tid[1], 0x0);
pthread_join(tid[2], 0x0);
pthread_join(tid[3], 0x0);
- pthread_join(tid[4], 0x0);
- pthread_join(tid[5], 0x0);
- pthread_join(tid[6], 0x0);
- pthread_join(tid[7], 0x0);
+ /* pthread_join(tid[4], 0x0); */
+ /* pthread_join(tid[5], 0x0); */
+ /* pthread_join(tid[6], 0x0); */
+ /* pthread_join(tid[7], 0x0); */
pthread_exit(0x0);
return (0x0);
}