From abd20a73b4733a1a8b845f6ff0817ed77e545173 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 10 Mar 2020 10:48:58 +0100 Subject: Freed multiple leaks --- src/ft_init_lists.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index bd2ae74..82f5c0e 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -76,6 +76,8 @@ static int8_t cl->f_rgb = ft_init_rgb(); cl->c_rgb = ft_init_rgb(); cl->rlist = ft_init_s_ray(); + if (!(cl->rlist.wall_dist_tab = (float*)malloc(1 * sizeof(float)))) + return (-1); cl->currlvl = 0; cl->walltexgood = 0; ft_init_funptr(cl); -- cgit v1.2.3 From 1bfb92324f267291f556cb464ea42a07d3c8224a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 00:36:54 +0100 Subject: Freed leaks --- src/ft_init_lists.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 82f5c0e..bd2ae74 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -76,8 +76,6 @@ static int8_t cl->f_rgb = ft_init_rgb(); cl->c_rgb = ft_init_rgb(); cl->rlist = ft_init_s_ray(); - if (!(cl->rlist.wall_dist_tab = (float*)malloc(1 * sizeof(float)))) - return (-1); cl->currlvl = 0; cl->walltexgood = 0; ft_init_funptr(cl); -- cgit v1.2.3 From bfa1f4e6e61152ba3ff555d1508f43f0a5ab2754 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:50:36 +0100 Subject: Secured collision segv --- src/ft_init_lists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index bd2ae74..8ba9a13 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -28,7 +28,7 @@ t_rgb return (rgb); } -static t_player +t_player ft_init_player(void) { t_player plist; -- cgit v1.2.3 From b236416db21d03f7749e1c80d5b7abee70ea07d5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 12:38:21 +0100 Subject: Pretty cool animation --- src/ft_init_lists.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 8ba9a13..79b0d14 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -43,6 +43,7 @@ t_player plist.dir_y = 0; plist.plane_x = 0; plist.plane_y = 0.66; + plist.life = 100; return (plist); } -- cgit v1.2.3 From 7f77c9bc922fb608f689385d642304956afe0492 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 16:07:29 +0100 Subject: Performance --- src/ft_init_lists.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ft_init_lists.c') diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 79b0d14..d480912 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -74,6 +74,7 @@ static int8_t cl->key_input[i] = -1; cl->ishud = 0; cl->isoldmus = 0; + cl->doicast = 1; cl->f_rgb = ft_init_rgb(); cl->c_rgb = ft_init_rgb(); cl->rlist = ft_init_s_ray(); -- cgit v1.2.3