From 9aab05aa368be99c2f5eec40ea7ae06843b2171b Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Fri, 21 Feb 2020 20:39:35 +0100 Subject: basically C++ --- src/ft_init_lists.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/ft_init_lists.c') 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); } -- cgit v1.2.3