-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathso_long.h
More file actions
86 lines (81 loc) · 2.29 KB
/
so_long.h
File metadata and controls
86 lines (81 loc) · 2.29 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
85
86
/* ************************************************************************** */
/* */
/* :::::::: */
/* so_long.h :+: :+: */
/* +:+ */
/* By: dkramer <dkramer@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2021/12/13 12:39:13 by dkramer #+# #+# */
/* Updated: 2021/12/13 13:33:27 by dkramer ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef SO_LONG_H
# define SO_LONG_H
typedef struct s_wall
{
int width;
int height;
void *mlx;
char *window;
void *image;
char *address;
int bits_per_pixel;
int line_size;
int endian;
} t_wall;
typedef struct s_mlx
{
char *map_file;
char **map;
int nr_of_lines;
int len;
int width;
int height;
void *mlx;
char *window;
void *image;
char *address;
int bits_per_pixel;
int line_size;
int endian;
t_wall wall;
t_wall collectible;
t_wall exit;
t_wall player;
int counter;
int offset;
int offset2;
unsigned int trgbcolor;
int x;
int y;
int i;
int a;
t_wall needed;
int exit_found;
int collectible_found;
int start_found;
int b;
int ret;
int fd;
t_wall wall1;
int error;
int breaky;
int coll;
int taken;
} t_mlx;
void mapparsing(t_mlx *mlx);
int mymlx_destroy_window(t_mlx *mlx);
int keypress(int keycode, t_mlx *mlx);
int create_trgb(int t, int r, int g, int b);
void my_pixel_put(t_mlx *mlx, int x, int y, unsigned int colour);
void displaymap(t_mlx *mlx);
t_wall createwall(t_mlx *mlx, char *filename);
void clearscreen(t_mlx *mlx);
void looplines(int i, int keycode, int a, t_mlx *mlx);
void checkmap(t_mlx *mlx);
void wup(t_mlx *mlx, int i, int a);
void sdown(t_mlx *mlx, int i, int a);
void dright(t_mlx *mlx, int i, int a);
void aleft(t_mlx *mlx, int i, int a);
void returnft(t_mlx *mlx);
#endif