diff options
| -rw-r--r-- | inc/cub3d_defines.h | 2 | ||||
| -rw-r--r-- | inc/cub3d_structs.h | 2 | ||||
| -rw-r--r-- | map/map_one.cub | 2 | ||||
| -rw-r--r-- | src/ft_init_lists.c | 11 | ||||
| -rw-r--r-- | src/ft_tex_weap_init.c | 1 | 
5 files changed, 16 insertions, 2 deletions
| diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 0d8c37f..c423ac7 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -100,7 +100,7 @@ enum  #   define FT_DEATH_SCREEN_PATH		"./media/img/screens/death_screen.xpm"  #   define FT_HUD_BACK_PATH			"./media/img/tex/plate_small.xpm"  #   define FT_WEAPON_ONE_SPR_PATH	"./media/img/sprites/sword_s.xpm" -#   define FT_WEAPON_TWO_SPR_PATH	"./media/img/sprites/sword_s.xpm" +#   define FT_WEAPON_TWO_SPR_PATH	"./media/img/sprites/colt_s.xpm"  #   define FT_WEAPON_ONE_PATH		"./media/img/weapons/sword_w.xpm"  #   define FT_WEAPON_ONE_FIRE_PATH	"./media/img/weapons/sword_w_fire.xpm"  #   define FT_WEAPON_TWO_PATH		"./media/img/weapons/sword_w.xpm" diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 8e38e36..ba6243b 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -143,6 +143,8 @@ typedef struct			s_player  	float				plane_x;  	float				plane_y;  	int8_t				life; +	uint8_t				has_weapon[2]; +	int8_t				handles_weapon;  }						t_player;  typedef struct			s_ray diff --git a/map/map_one.cub b/map/map_one.cub index 899a006..6a5658c 100644 --- a/map/map_one.cub +++ b/map/map_one.cub @@ -22,7 +22,7 @@ SH 2  10000E000T00333301  100000000000444401  100100000+00000001 -10110!0@0111000001 +10110@0!0111000001  111111111111110011  1000001     100001  1001001     100001 diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 99ebd65..9b44114 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -27,6 +27,14 @@ t_rgb  	return (rgb);  } +/* +** handles_weapon +** -------------- +** -1: no weapon +**  0: weapon one +**  1: weapon two +*/ +  t_player  	ft_init_player(void)  { @@ -43,6 +51,9 @@ t_player  	plist.plane_x = 0;  	plist.plane_y = 0.66;  	plist.life = 100; +	plist.has_weapon[0] = 0; +	plist.has_weapon[1] = 0; +	plist.handles_weapon = -1;  	return (plist);  } diff --git a/src/ft_tex_weap_init.c b/src/ft_tex_weap_init.c index ac78de9..983da0b 100644 --- a/src/ft_tex_weap_init.c +++ b/src/ft_tex_weap_init.c @@ -18,6 +18,7 @@  /*  ** tweap[] index summary +** ---------------------  ** 0: weapon one  ** 1: weapon one fire  ** 2: weapon two | 
