mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
dev: allocated weapon on the heap
This commit is contained in:
parent
0b00f5608c
commit
4048f5d1e3
8 changed files with 68 additions and 45 deletions
31
src/player/weapon.h
Normal file
31
src/player/weapon.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* weapon.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/17 16:50:52 by tchampio #+# #+# */
|
||||
/* Updated: 2025/09/17 16:52:29 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef WEAPON_H
|
||||
# define WEAPON_H
|
||||
|
||||
# include "../draw/img_data.h"
|
||||
|
||||
typedef struct s_weapon
|
||||
{
|
||||
t_img_data *texture;
|
||||
t_img_data *shoot_texture;
|
||||
bool is_auto;
|
||||
bool is_shooting;
|
||||
bool reloading;
|
||||
int clip;
|
||||
int remaining_ammos;
|
||||
int base_clip;
|
||||
int base_ammos;
|
||||
} t_weapon;
|
||||
|
||||
#endif // WEAPON_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue