aboutsummaryrefslogtreecommitdiffstats
path: root/inc/cub3d.h
blob: 4f495d459b975a7d80bfa3ec414f68cd93fc8a8f (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
#ifndef CUB3D_H
#define CUB3D_H

#include <inttypes.h>

#ifndef FT_W_KEY
#define FT_W_KEY 13
#endif
#ifndef FT_A_KEY
#define FT_A_KEY 0
#endif
#ifndef FT_S_KEY
#define FT_S_KEY 1
#endif
#ifndef FT_D_KEY
#define FT_D_KEY 2
#endif
#ifndef FT_ESC_KEY
#define FT_ESC_KEY 53
#endif

typedef struct	s_win
{
	void		*wlx;
	void		*winptr;
	int			x_size;
	int			y_size;
}				t_win;

typedef struct	s_cub
{
	char		*north_path;
	char		*south_path;
	char		*west_path;
	char		*east_path;
	char		*sprite_path;
	int			f_color;
	int			c_color;
}				t_cub;

t_cub			*ft_init_cub(void);
t_win			*ft_init_win(void);
void			ft_parse_map(t_win *wlist, t_cub *clist, const char *map_path);
int				ft_key_event(int keycode, void *param);
int				ft_exit(uint8_t exit_code);
void			ft_drawsquare(t_win *wlist, t_cub *clist, int a, int b);
int				ft_get_res(int fd, t_win *wlist);
int				ft_map_error(unsigned int line);
int				ft_init_winlx(t_win *wlist);

#endif