diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-27 19:20:28 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-27 19:20:28 +0100 |
commit | 0c2bb0f610c0af0680b46fc4566a207d59781e4d (patch) | |
tree | 986d6dd6a19416593c9b2c043312ffa5d4f0be73 /inc/cub3d.h | |
parent | in progress (diff) | |
download | 42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.gz 42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.bz2 42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.xz 42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.zst 42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.zip |
Switched lists entierly
Diffstat (limited to 'inc/cub3d.h')
-rw-r--r-- | inc/cub3d.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 7df93ad..9462035 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -2,6 +2,7 @@ #define CUB3D_H #include <inttypes.h> +#include <stddef.h> #ifndef FT_W_KEY #define FT_W_KEY 13 @@ -19,6 +20,14 @@ #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 *no_tex_path; @@ -29,34 +38,27 @@ typedef struct s_cub int f_color; int c_color; char **map; + size_t map_width; + struct s_win *wlist; } t_cub; -typedef struct s_win -{ - void *wlx; - void *winptr; - int x_size; - int y_size; - struct s_cub *clist; -} t_win; - t_win *ft_init_win(void); t_cub *ft_init_cub(void); -void ft_parse_map(const char *map_path, t_win *wlist); +void ft_parse_map(const char *map_path, t_cub *clist); int ft_key_event(int keycode, void *param); -int ft_exit(uint8_t exit_code, t_win *wlist); -void ft_drawsquare(int a, int b, int rgb, t_win *wlist); -int ft_get_res(int fd, t_win *wlist); -int ft_get_tex(int fd, t_win *wlist); -int ft_get_sprite_tex(int fd, t_win *wlist); -int ft_get_colors(int fd, t_win *wlist); -int ft_get_map(int fd, t_win *wlist); +int ft_exit(uint8_t exit_code, t_cub *clist); +void ft_drawsquare(int a, int b, int rgb, t_cub *clist); +int ft_get_res(int fd, t_cub *clist); +int ft_get_tex(int fd, t_cub *clist); +int ft_get_sprite_tex(int fd, t_cub *clist); +int ft_get_colors(int fd, t_cub *clist); +int ft_get_map(int fd, t_cub *clist); void ft_check_empty_line(int fd, unsigned int linum, - t_win *wlist); + t_cub *clist); void ft_free_words(char **words, char *line); -int ft_map_error(unsigned int linum, t_win *wlist); -int ft_init_winlx(t_win *wlist); -void ft_print_list(t_win *wlist); +int ft_map_error(unsigned int linum, t_cub *clist); +int ft_init_winlx(t_cub *clist); +void ft_print_list(t_cub *clist); #endif |