2025-07-17 14:57:29 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
|
/* */
|
|
|
|
|
/* ::: :::::::: */
|
|
|
|
|
/* cub3d_data.h :+: :+: :+: */
|
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
|
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
|
2025-09-09 10:17:28 +02:00
|
|
|
/* Updated: 2025/09/09 09:55:15 by tchampio ### ########.fr */
|
2025-07-17 14:57:29 +02:00
|
|
|
/* */
|
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
|
|
#ifndef CUB3D_DATA_H
|
|
|
|
|
# define CUB3D_DATA_H
|
|
|
|
|
|
|
|
|
|
# include "map/mapdata.h"
|
|
|
|
|
# include "draw/img_data.h"
|
2025-08-05 13:22:06 +02:00
|
|
|
# include "sprites/sprite.h"
|
2025-07-17 14:57:29 +02:00
|
|
|
# include "player/player.h"
|
2025-07-29 14:58:30 +02:00
|
|
|
# include "utils/keypresses.h"
|
2025-07-30 16:25:12 +02:00
|
|
|
# include "consts.h"
|
2025-07-17 14:57:29 +02:00
|
|
|
|
2025-08-05 13:22:06 +02:00
|
|
|
// the 4 static sprites are some of the perks and the mystery box
|
2025-07-17 14:57:29 +02:00
|
|
|
typedef struct s_cub3d_data
|
|
|
|
|
{
|
2025-07-29 12:31:05 +02:00
|
|
|
void *mlx;
|
|
|
|
|
void *mlx_win;
|
2025-08-05 13:08:47 +02:00
|
|
|
t_img_data *no_texture;
|
|
|
|
|
t_img_data *so_texture;
|
|
|
|
|
t_img_data *we_texture;
|
|
|
|
|
t_img_data *ea_texture;
|
2025-09-09 10:17:28 +02:00
|
|
|
t_img_data *barricades_texture;
|
2025-07-29 12:31:05 +02:00
|
|
|
t_img_data *img_data;
|
2025-08-20 17:08:13 +02:00
|
|
|
t_img_data *point_figures[10];
|
2025-09-03 16:38:38 +02:00
|
|
|
t_img_data *perk_logos[3];
|
2025-09-03 18:39:30 +02:00
|
|
|
t_img_data *tally_marks[5];
|
|
|
|
|
t_img_data *round_figures[10];
|
2025-09-08 10:36:52 +02:00
|
|
|
t_img_data *gun;
|
2025-07-29 12:31:05 +02:00
|
|
|
t_mapdata *map;
|
|
|
|
|
t_player player;
|
|
|
|
|
t_keypresses keypresses;
|
2025-07-31 13:17:27 +02:00
|
|
|
int *screen_matrix;
|
2025-07-31 14:07:56 +02:00
|
|
|
int delta;
|
|
|
|
|
int last_tick;
|
2025-08-07 12:35:01 +02:00
|
|
|
t_sprite **sprite_list;
|
2025-08-14 21:38:49 +02:00
|
|
|
int sprite_counter;
|
2025-08-06 14:06:15 +02:00
|
|
|
double zbuffer[WIDTH];
|
|
|
|
|
int sprite_order[MAX_SPRITES];
|
|
|
|
|
double sprite_distances[MAX_SPRITES];
|
2025-09-03 18:39:30 +02:00
|
|
|
int round;
|
2025-07-17 14:57:29 +02:00
|
|
|
} t_cub3d_data;
|
|
|
|
|
|
|
|
|
|
#endif // CUB3D_DATA_H
|