cub3d/inc/cub3d.h
2025-04-15 12:54:55 +02:00

62 lines
1.5 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cub3d.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/15 12:22:29 by qmennen #+# #+# */
/* Updated: 2025/04/15 12:51:19 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CUB3D_H
# define CUB3D_H
# include <MLX42.h>
# include <libft.h>
typedef enum TILE
{
TILE_VOID = -1,
TILE_EMPTY = 0,
TILE_WALL = 1,
TILE_PLAYER = 2,
} t_tile;
typedef struct s_vec2
{
float x;
float y;
} t_vec2;
typedef struct s_player
{
t_vec2 pos;
float speed;
float angle;
float fov;
} t_player;
typedef struct s_map
{
unsigned int width;
unsigned int height;
t_tile **grid;
} t_map;
typedef struct s_screen
{
mlx_t *mlx;
mlx_image_t *img;
unsigned int width;
unsigned int height;
} t_screen;
typedef struct s_game
{
t_map *map;
t_player *player;
} t_game;
#endif