mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
48 lines
1.7 KiB
C
48 lines
1.7 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* cub3d_data.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
|
|
/* Updated: 2025/09/03 16:31:54 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"
|
|
# 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_img_data *point_figures[10];
|
|
t_img_data *perk_logos[3];
|
|
t_mapdata *map;
|
|
t_player player;
|
|
t_keypresses keypresses;
|
|
int *screen_matrix;
|
|
int delta;
|
|
int last_tick;
|
|
t_sprite **sprite_list;
|
|
int sprite_counter;
|
|
double zbuffer[WIDTH];
|
|
int sprite_order[MAX_SPRITES];
|
|
double sprite_distances[MAX_SPRITES];
|
|
} t_cub3d_data;
|
|
|
|
#endif // CUB3D_DATA_H
|