blob: 48fc0097f748dfe08482dfb4e6f7a1f2beea88af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_basic_keys.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:43:55 by rbousset #+# #+# */
/* Updated: 2020/02/14 17:43:56 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include <cub3d.h>
#include <stdint.h>
int
ft_w_key(t_cub *clist)
{
t_player *pl;
pl = clist->plist;
pl->pos_y += 0.2 * (-1);
pl->pos_x += 0;
return (0);
}
int
ft_a_key(t_cub *clist)
{
t_player *pl;
pl = clist->plist;
pl->pos_x -= 0.2;
return (0);
}
int
ft_s_key(t_cub *clist)
{
t_player *pl;
pl = clist->plist;
pl->pos_y += 0.2;
return (0);
}
int
ft_d_key(t_cub *clist)
{
t_player *pl;
pl = clist->plist;
pl->pos_x += 0.2;
return (0);
}
|