aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-03-01 20:16:08 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-03-01 20:16:08 +0100
commitc17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2 (patch)
treea26b855ed725612ab973d1736f330c24ff9cd91b /src
parentMap update again (diff)
download42-cub3d-c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2.tar.gz
42-cub3d-c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2.tar.bz2
42-cub3d-c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2.tar.xz
42-cub3d-c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2.tar.zst
42-cub3d-c17ce9ebac3acbb4879d142ef33b6a8d05fd0aa2.zip
Better h
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);
}