diff options
Diffstat (limited to 'src/ft_init_lists.c')
-rw-r--r-- | src/ft_init_lists.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 6917db2..0fa4ba2 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -78,16 +78,19 @@ static t_cub !(clist->mlist = ft_init_map())) return (NULL); ft_bzero(clist->errmsg, 40); - i = 0; - while (i < 5) - { + i = -1; + while (++i < 5) clist->key_input[i] = -1; - i++; - } clist->minimap = 0; clist->f_rgb = ft_init_rgb(); clist->c_rgb = ft_init_rgb(); clist->rlist = ft_init_s_ray(); + clist->key_ptr[0] = ft_w_key; + clist->key_ptr[1] = ft_a_key; + clist->key_ptr[2] = ft_s_key; + clist->key_ptr[3] = ft_d_key; + clist->key_ptr[4] = ft_left_key; + clist->key_ptr[5] = ft_right_key; return (clist); } |