-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathso_long_bonus.h
More file actions
84 lines (77 loc) · 2.4 KB
/
so_long_bonus.h
File metadata and controls
84 lines (77 loc) · 2.4 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* so_long_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kalshaer <kalshaer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/22 08:09:56 by kalshaer #+# #+# */
/* Updated: 2023/03/30 10:45:53 by kalshaer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SO_LONG_BONUS_H
# define SO_LONG_BONUS_H
# define PIXCEL 50
# define D_UP "textures/dolphinup.xpm"
# define D_RIGHT "textures/dolphinright.xpm"
# define D_DOWN "textures/dolphindown.xpm"
# define D_LEFT "textures/dolphinleft.xpm"
# define SHARK "textures/shark.xpm"
# define F_RIGHT "textures/fishleft.xpm"
# define F_LEFT "textures/fishright.xpm"
# define WALL "textures/wall.xpm"
# define SPACE "textures/seab.xpm"
# define EXIT "textures/seagate.xpm"
# include "minilibx/mlx.h"
# include "libft/libft.h"
typedef struct s_img
{
void *img;
char *path;
} t_img;
typedef struct s_mlx
{
t_img p;
t_img w;
t_img e;
t_img s;
t_img c;
t_img sh;
void *mlx;
void *win;
char **map;
int map_x;
int map_y;
int p_x;
int p_y;
int i;
int j;
int count;
} t_mlx;
typedef struct s_count
{
int e_count;
int c_count;
int p_count;
int e_x;
int e_y;
} t_count;
char **map_check(char *map, int *mlxcount);
void move_up(t_mlx *mlx, int *count);
void move_right(t_mlx *mlx, int *count);
void move_down(t_mlx *mlx, int *count);
void move_left(t_mlx *mlx, int *count);
void up_utils(t_mlx *mlx);
void right_utils(t_mlx *mlx);
void down_utils(t_mlx *mlx);
void left_utils(t_mlx *mlx);
int close_window(t_mlx *mlx);
int hooking_function(int key, t_mlx *mlx);
void create_map(t_mlx *mlx);
void errorh(char *s, char **split, char *ss);
void errorh2(char *s, char **split, char **split2, char *ss);
int rendering(t_mlx *mlx);
int count_symbols(char *ss, int i);
void free_s(char **split);
void destory(char *s, t_mlx *mlx, int exit_code);
#endif