cub3d/src/cub3d_data.h

46 lines
1.6 KiB
C
Raw Normal View History

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cub3d_data.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
2025-08-06 14:06:15 +02:00
/* Updated: 2025/08/05 15:44:27 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CUB3D_DATA_H
# define CUB3D_DATA_H
# include "map/mapdata.h"
# include "draw/img_data.h"
# include "sprites/sprite.h"
# include "player/player.h"
# include "utils/keypresses.h"
2025-07-30 16:25:12 +02:00
# include "consts.h"
// the 4 static sprites are some of the perks and the mystery box
typedef struct s_cub3d_data
{
void *mlx;
void *mlx_win;
t_img_data *no_texture;
t_img_data *so_texture;
t_img_data *we_texture;
t_img_data *ea_texture;
t_img_data *img_data;
t_mapdata *map;
t_player player;
t_keypresses keypresses;
int *screen_matrix;
2025-07-31 14:07:56 +02:00
int delta;
int last_tick;
t_sprite static_sprite[4];
2025-08-06 14:06:15 +02:00
double zbuffer[WIDTH];
int sprite_order[MAX_SPRITES];
double sprite_distances[MAX_SPRITES];
} t_cub3d_data;
#endif // CUB3D_DATA_H