aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_init_lists.c')
-rw-r--r--src/ft_init_lists.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index f9c5c6c..4fb5256 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -14,9 +14,11 @@ t_win
if (!(wlist->wlx = ft_calloc(1, 1)) ||
!(wlist->winptr = ft_calloc(1, 1)))
return (NULL);
+ wlist->wlx = NULL;
+ wlist->winptr = NULL;
wlist->inited = 0;
- wlist->x_size = 0;
- wlist->y_size = 0;
+ wlist->x_size = -1;
+ wlist->y_size = -1;
return (wlist);
}
@@ -33,8 +35,8 @@ t_cub
!(clist->we_tex_path = (char*)ft_calloc(1, sizeof(char))) ||
!(clist->sprite_path = (char*)ft_calloc(1, sizeof(char))))
return (NULL);
- clist->f_color = 0;
- clist->c_color = 0;
+ clist->f_color = -1;
+ clist->c_color = -1;
if (!(clist->map = (char**)ft_calloc(2, sizeof(char*))))
return (NULL);
if (!(clist->map[0] = (char*)ft_calloc(1, sizeof(char))))
@@ -42,5 +44,10 @@ t_cub
clist->map[1] = 0;
clist->map_w = 0;
clist->line_chk = 0;
+ clist->no_tex_path = NULL;
+ clist->so_tex_path = NULL;
+ clist->ea_tex_path = NULL;
+ clist->we_tex_path = NULL;
+ clist->sprite_path = NULL;
return (clist);
}