#ifndef CUB3D_H #define CUB3D_H #include #include #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; uint8_t inited; uint16_t x_size; uint16_t y_size; } t_win; typedef struct s_cub { char *no_tex_path; char *so_tex_path; char *ea_tex_path; char *we_tex_path; char *sprite_path; int f_color; int c_color; char **map; size_t map_w; size_t line_chk; struct s_win *wlist; } t_cub; t_win *ft_init_win(void); t_cub *ft_init_cub(void); int ft_key_event(int keycode, void *param); int ft_exit(uint8_t exit_code, t_cub *clist); void ft_drawsquare(int a, int b, int rgb, t_cub *clist); void ft_parse_map(const char *map_path, t_cub *clist); uint8_t ft_select_get(char **words, t_cub *clist); int ft_get_res(char **words, t_cub *clist); int ft_get_tex_no(char **words, t_cub *clist); int ft_get_tex_so(char **words, t_cub *clist); int ft_get_tex_ea(char **words, t_cub *clist); int ft_get_tex_we(char **words, t_cub *clist); int ft_get_sprite(char **words, t_cub *clist); int ft_get_f_color(char **words, t_cub *clist); int ft_get_c_color(char **words, t_cub *clist); int ft_get_map(int fd, t_cub *clist); void ft_check_empty_line(int fd, unsigned int linum, t_cub *clist); void ft_free_words(char **words); int ft_map_error(t_cub *clist); int ft_init_winlx(t_cub *clist); void ft_drawmap(t_cub *clist); void ft_print_list(t_cub *clist); #endif