/* ************************************************************************** */ /* */ /* :::::::: */ /* cub3d.h :+: :+: */ /* +:+ */ /* By: houtworm +#+ */ /* +#+ */ /* Created: 2023/10/26 10:46:35 by houtworm #+# #+# */ /* Updated: 2023/10/29 17:04:28 by houtworm ######## odam.nl */ /* */ /* ************************************************************************** */ #ifndef CUB3D_H # define CUB3D_H # include # include # include # include "libft/libft.h" # include "getnextline/get_next_line.h" # include "mlx/include/MLX42/MLX42.h" typedef struct s_varlist { mlx_t *mlx; mlx_image_t *img; mlx_image_t *fps; int fpsrefresh; int w; int h; char **map; double frametime; double posx; double posy; double dirx; double diry; double planex; double planey; double camerax; double cameray; double raydirx; double raydiry; double movespeed; double rotspeed; int mapx; int mapy; double sidedistx; double sidedisty; double deltadistx; double deltadisty; double perpwalldist; int stepx; int stepy; int hit; int side; double run; double oldmouseposx; double oldmouseposy; // only needed if we do vertical aiming int32_t fcolor; int32_t ccolor; char *northwt; char *eastwt; char *southwt; char *westwt; int resize; } t_varlist; void ft_frametime(t_varlist *vl); // init.c t_varlist initvarlist(void); // parse.c t_varlist ft_parseconfigfile(t_varlist vl, char *filename); // map.c char **ft_getmap(t_varlist *vl, int fd); // keys.c void ft_movementkeys(t_varlist *vl); void keyhook(mlx_key_data_t kd, void *param); void scrollhook(double xdelta, double ydelta, void *param); void resizehook(int x, int y, void *param); void cursorhook(double x, double y, void *param); // raycast.c void ft_raycast(t_varlist *vl); // draw.c void ft_drawline(int x, t_varlist *vl, int drawstart, int drawend); // error.c int ft_errorexit(char *reason, char *function, int code); #endif