From c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2 Mon Sep 17 00:00:00 2001
From: Rudy Bousset <rbousset@z2r5p2.le-101.fr>
Date: Sun, 1 Mar 2020 20:16:08 +0100
Subject: Better h

---
 src/ft_exit.c       | 17 +++++++++++++++++
 src/ft_init_lists.c |  3 ++-
 2 files changed, 19 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/ft_exit.c b/src/ft_exit.c
index b2efe2f..dec46b1 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -53,11 +53,28 @@ int
 			mlx_destroy_image(clist->wlist->wlx, clist->tlist[3].img);
 		if (clist->tlist[4].img)
 			mlx_destroy_image(clist->wlist->wlx, clist->tlist[4].img);
+		clist->tlist[0].img = NULL;
+		clist->tlist[1].img = NULL;
+		clist->tlist[2].img = NULL;
+		clist->tlist[3].img = NULL;
+		clist->tlist[4].img = NULL;
+		clist->tlist[0].ptr = NULL;
+		clist->tlist[1].ptr = NULL;
+		clist->tlist[2].ptr = NULL;
+		clist->tlist[3].ptr = NULL;
+		clist->tlist[4].ptr = NULL;
 		if (clist->mlist->isnlvl && clist->tlist[5].img)
+		{
 			mlx_destroy_image(clist->wlist->wlx, clist->tlist[5].img);
+			clist->tlist[5].img = NULL;
+			clist->tlist[5].ptr = NULL;
+		}
 	}
 	if (clist->wlist->inited)
+	{
 		mlx_destroy_window(clist->wlist->wlx, clist->wlist->winptr);
+		clist->wlist->winptr = NULL;
+	}
 	ft_free_lists(clist);
 	ft_printf("Exiting program\n");
 	exit(exit_code);
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index 055fd98..1c1089c 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -44,7 +44,8 @@ static t_player
 	plist->dir_x = -1;
 	plist->dir_y = 0;
 	plist->plane_x = 0;
-	plist->plane_y = 0.66666666;
+	/* plist->plane_y = 0.66666666; */
+	plist->plane_y = 0.75;
 	return (plist);
 }
 
-- 
cgit v1.2.3