aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c17
-rw-r--r--src/ft_init_lists.c3
2 files changed, 19 insertions, 1 deletions
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);
}