-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_movements.c
45 lines (40 loc) · 1.41 KB
/
ft_movements.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_movements.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: atabiti <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/19 10:43:13 by atabiti #+# #+# */
/* Updated: 2022/03/20 09:32:38 by atabiti ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
int ft_move_up(struct s_s2 *a)
{
put_image(a, "./xpms/empty.xpm");
a->y -= 50;
put_image(a, "./xpms/zoro.xpm");
return (0);
}
int ft_move_down(struct s_s2 *a)
{
put_image(a, "./xpms/empty.xpm");
a->y += 50;
put_image(a, "./xpms/zoro.xpm");
return (0);
}
int ft_move_right(struct s_s2 *a)
{
put_image(a, "./xpms/empty.xpm");
a->x += 50;
put_image(a, "./xpms/zoro.xpm");
return (0);
}
int ft_move_left(struct s_s2 *a)
{
put_image(a, "./xpms/empty.xpm");
a->x -= 50;
put_image(a, "./xpms/zoro.xpm");
return (0);
}