aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-21 20:39:35 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-21 20:39:35 +0100
commit9aab05aa368be99c2f5eec40ea7ae06843b2171b (patch)
tree3379cd86b953d04074a25f88b6461074ccbc80ab /src/ft_init_lists.c
parentRemoved shit music (diff)
download42-cub3d-9aab05aa368be99c2f5eec40ea7ae06843b2171b.tar.gz
42-cub3d-9aab05aa368be99c2f5eec40ea7ae06843b2171b.tar.bz2
42-cub3d-9aab05aa368be99c2f5eec40ea7ae06843b2171b.tar.xz
42-cub3d-9aab05aa368be99c2f5eec40ea7ae06843b2171b.tar.zst
42-cub3d-9aab05aa368be99c2f5eec40ea7ae06843b2171b.zip
basically C++
Diffstat (limited to '')
-rw-r--r--src/ft_init_lists.c13
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);
}