dev: Added a registry for weapons

The registry is for storing weapons structs as they are closer to actual
objects than simple data.
This commit is contained in:
Theo Champion 2025-09-18 12:10:25 +02:00
parent 4048f5d1e3
commit 66c3bda4df
9 changed files with 117 additions and 15 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
/* Updated: 2025/09/16 15:13:28 by tchampio ### ########.fr */
/* Updated: 2025/09/18 12:01:18 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,6 +15,7 @@
# include "map/mapdata.h"
# include "draw/img_data.h"
#include "player/weapon.h"
# include "sprites/sprite.h"
# include "utils/keypresses.h"
# include "consts.h"
@ -43,6 +44,7 @@ typedef struct s_cub3d_data
int delta;
int last_tick;
t_sprite **sprite_list;
t_weapon **weaponsregistry;
int sprite_counter;
double zbuffer[WIDTH];
int sprite_order[MAX_SPRITES];