feat: Made a sprite structure and added a static sprite field in data

A static sprite is a sprite that is not supposed to move, it'll be
placed at the parsing part. The sprite struct is prone to change as I am
testing it
This commit is contained in:
Theo Champion 2025-08-05 13:22:06 +02:00
parent 07dc80ba6a
commit d3ba05a36d
2 changed files with 29 additions and 1 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
/* Updated: 2025/08/05 13:09:22 by kcolin ### ########.fr */
/* Updated: 2025/08/05 13:37:57 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,10 +15,12 @@
# 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;
@ -34,6 +36,7 @@ typedef struct s_cub3d_data
int *screen_matrix;
int delta;
int last_tick;
t_sprite static_sprite[4];
} t_cub3d_data;
#endif // CUB3D_DATA_H