aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_click_close.c1
-rw-r--r--src/ft_exit.c8
-rw-r--r--src/ft_init_lists.c4
-rw-r--r--src/ft_init_winlx.c1
4 files changed, 8 insertions, 6 deletions
diff --git a/src/ft_click_close.c b/src/ft_click_close.c
index 113c241..02efbe3 100644
--- a/src/ft_click_close.c
+++ b/src/ft_click_close.c
@@ -20,6 +20,7 @@ int
{
(void)keycode;
(void)clist;
+ /* ft_exit(0, clist); */
exit(0);
return (0);
}
diff --git a/src/ft_exit.c b/src/ft_exit.c
index dec46b1..1c4a1a8 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -15,7 +15,7 @@
#include <mlx.h>
#include <stddef.h>
#include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
static void
ft_free_lists(t_cub *clist)
@@ -33,7 +33,7 @@ static void
ft_memdel((void**)&clist->plist);
if (!clist->wlist->inited)
ft_memdel((void**)&clist->wlist->winptr);
- ft_memdel((void**)&clist->wlist->wlx);
+ /* ft_memdel((void**)&clist->wlist->wlx); */
ft_memdel((void**)&clist->wlist);
ft_memdel((void**)&clist);
}
@@ -41,6 +41,9 @@ static void
int
ft_exit(uint8_t exit_code, t_cub *clist)
{
+ /* uint8_t i; */
+
+ /* i = 0; */
if (clist->walltexgood)
{
if (clist->tlist[0].img)
@@ -77,6 +80,7 @@ int
}
ft_free_lists(clist);
ft_printf("Exiting program\n");
+ while (1);
exit(exit_code);
return (0);
}
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index 1c1089c..65c28d8 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -44,7 +44,6 @@ static t_player
plist->dir_x = -1;
plist->dir_y = 0;
plist->plane_x = 0;
- /* plist->plane_y = 0.66666666; */
plist->plane_y = 0.75;
return (plist);
}
@@ -56,8 +55,7 @@ static t_win
if (!(wlist = (t_win*)malloc(sizeof(t_win))))
return (NULL);
- if (!(wlist->wlx = malloc(1)) ||
- !(wlist->winptr = malloc(1)))
+ if (!(wlist->winptr = malloc(1)))
return (NULL);
wlist->inited = 0;
wlist->x_size = 0;
diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c
index db1d88d..87398e4 100644
--- a/src/ft_init_winlx.c
+++ b/src/ft_init_winlx.c
@@ -18,7 +18,6 @@
int
ft_init_winlx(t_cub *clist)
{
- ft_memdel((void**)&clist->wlist->wlx);
if (!(clist->wlist->wlx = mlx_init()))
return (-1);
return (0);