-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathso_long.h
62 lines (56 loc) · 1.91 KB
/
so_long.h
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
56
57
58
59
60
61
62
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* so_long.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ybachar <ybachar@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/09 14:59:50 by ybachar #+# #+# */
/* Updated: 2023/01/20 17:13:09 by ybachar ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SO_LONG_H
# define SO_LONG_H
# include <unistd.h>
# include <string.h>
# include <stdlib.h>
# include <mlx.h>
# include "get_next_line.h"
# include "ft_printf/ft_printf.h"
typedef struct vars
{
int i;
int j;
int p;
int e;
int c;
} t_intvars;
typedef struct t_map
{
int x;
int y;
char *exit;
char *player;
char *empty;
char *wall;
char *collectible;
} t_map;
int is_map_valid(char **map, char *map_path);
int ft_exit(t_vars *var);
int check_liens_l(char **map, char *map_path);
int map_lines(char *map);
int check_walls(char **map, char *map_path);
int map_req(char **map);
int key_hook(int keycode, t_vars *vars);
int check_map_compos(char **map);
char **get_map(char *map_path);
char **check_path(char **map, int j, int i);
void draw_to_win(t_vars var, char **map);
void put_bg(t_vars var);
t_intvars get_plyer_pos(char **map);
int is_path_valid(char **map);
int map_name(char *name );
void free_map(char **map);
void start(char **map);
int check_path_e(char **map, int j, int i);
#endif