diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/cub3d.h | 4 | ||||
-rw-r--r-- | inc/cub3d_defines.h | 91 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 14 |
3 files changed, 62 insertions, 47 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index e3596f7..ceee453 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -173,6 +173,8 @@ void ft_sfx_weapon_one_load(t_sfx *sfx); void ft_sfx_weapon_one_fire(t_sfx *sfx); void ft_sfx_weapon_two_load(t_sfx *sfx); void ft_sfx_weapon_two_fire(t_sfx *sfx); +void ft_sfx_weapon_three_load(t_sfx *sfx); +void ft_sfx_weapon_three_fire(t_sfx *sfx); void *ft_sfx_death_thread(void *vargp); void *ft_sfx_footstep_thread(void *vargp); void *ft_sfx_new_lvl_thread(void *vargp); @@ -183,6 +185,8 @@ void *ft_sfx_weapon_one_load_thread(void *vargp); void *ft_sfx_weapon_one_fire_thread(void *vargp); void *ft_sfx_weapon_two_load_thread(void *vargp); void *ft_sfx_weapon_two_fire_thread(void *vargp); +void *ft_sfx_weapon_three_load_thread(void *vargp); +void *ft_sfx_weapon_three_fire_thread(void *vargp); /* ** ====== DELETION ====== diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 6148cd2..1e71801 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -92,38 +92,43 @@ enum ** ====== NEEDED PATHS ====== */ -# define FT_SFX_DEATH_PATH "./media/sound/sfx/death_screen.wav" -# define FT_SFX_FS_ONE_PATH "./media/sound/sfx/footstep_one.wav" -# define FT_SFX_FS_TWO_PATH "./media/sound/sfx/footstep_two.wav" -# define FT_SFX_N_LVL_PATH "./media/sound/sfx/next_lvl.wav" -# define FT_SFX_SCR_ONE_PATH "./media/sound/sfx/scream_one.wav" -# define FT_SFX_SCR_TWO_PATH "./media/sound/sfx/scream_two.wav" -# define FT_SFX_TRAP_PATH "./media/sound/sfx/trap.wav" -# define FT_SFX_HEAL_PATH "./media/sound/sfx/heal.wav" -# define FT_SFX_W_ONE_LOAD_PATH "./media/sound/sfx/sword_load.wav" -# define FT_SFX_W_ONE_FIRE_PATH "./media/sound/sfx/sword_fire.wav" -# define FT_SFX_W_TWO_LOAD_PATH "./media/sound/sfx/colt_load.wav" -# define FT_SFX_W_TWO_FIRE_PATH "./media/sound/sfx/colt_fire.wav" -# 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/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/colt_w.xpm" -# define FT_WEAPON_TWO_FIRE_PATH "./media/img/weapons/colt_w_fire.xpm" -# define FT_HEAL_PACK_PATH "./media/img/sprites/first_aid.xpm" -# define FT_ZER_PATH "./media/img/numbers/zero.xpm" -# define FT_ONE_PATH "./media/img/numbers/one.xpm" -# define FT_TWO_PATH "./media/img/numbers/two.xpm" -# define FT_THR_PATH "./media/img/numbers/three.xpm" -# define FT_FOU_PATH "./media/img/numbers/four.xpm" -# define FT_FIV_PATH "./media/img/numbers/five.xpm" -# define FT_SIX_PATH "./media/img/numbers/six.xpm" -# define FT_SEV_PATH "./media/img/numbers/seven.xpm" -# define FT_EIG_PATH "./media/img/numbers/eight.xpm" -# define FT_NIN_PATH "./media/img/numbers/nine.xpm" -# define FT_PER_PATH "./media/img/numbers/percent.xpm" +# define FT_SFX_DEATH_PATH "./media/sound/sfx/death_screen.wav" +# define FT_SFX_FS_ONE_PATH "./media/sound/sfx/footstep_one.wav" +# define FT_SFX_FS_TWO_PATH "./media/sound/sfx/footstep_two.wav" +# define FT_SFX_N_LVL_PATH "./media/sound/sfx/next_lvl.wav" +# define FT_SFX_SCR_ONE_PATH "./media/sound/sfx/scream_one.wav" +# define FT_SFX_SCR_TWO_PATH "./media/sound/sfx/scream_two.wav" +# define FT_SFX_TRAP_PATH "./media/sound/sfx/trap.wav" +# define FT_SFX_HEAL_PATH "./media/sound/sfx/heal.wav" +# define FT_SFX_W_ONE_LOAD_PATH "./media/sound/sfx/sword_load.wav" +# define FT_SFX_W_ONE_FIRE_PATH "./media/sound/sfx/sword_fire.wav" +# define FT_SFX_W_TWO_LOAD_PATH "./media/sound/sfx/colt_load.wav" +# define FT_SFX_W_TWO_FIRE_PATH "./media/sound/sfx/colt_fire.wav" +# define FT_SFX_W_THREE_LOAD_PATH "./media/sound/sfx/colt_load.wav" +# define FT_SFX_W_THREE_FIRE_PATH "./media/sound/sfx/colt_fire.wav" +# 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/weapons/sword_s.xpm" +# define FT_WEAPON_TWO_SPR_PATH "./media/img/weapons/colt_s.xpm" +# define FT_WEAPON_THREE_SPR_PATH "./media/img/weapons/double_b_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/colt_w.xpm" +# define FT_WEAPON_TWO_FIRE_PATH "./media/img/weapons/colt_w_fire.xpm" +# define FT_WEAPON_THREE_PATH "./media/img/weapons/double_b_w.xpm" +# define FT_WEAPON_THREE_FIRE_PATH "./media/img/weapons/double_b_w.xpm" +# define FT_HEAL_PACK_PATH "./media/img/sprites/first_aid.xpm" +# define FT_ZER_PATH "./media/img/numbers/zero.xpm" +# define FT_ONE_PATH "./media/img/numbers/one.xpm" +# define FT_TWO_PATH "./media/img/numbers/two.xpm" +# define FT_THR_PATH "./media/img/numbers/three.xpm" +# define FT_FOU_PATH "./media/img/numbers/four.xpm" +# define FT_FIV_PATH "./media/img/numbers/five.xpm" +# define FT_SIX_PATH "./media/img/numbers/six.xpm" +# define FT_SEV_PATH "./media/img/numbers/seven.xpm" +# define FT_EIG_PATH "./media/img/numbers/eight.xpm" +# define FT_NIN_PATH "./media/img/numbers/nine.xpm" +# define FT_PER_PATH "./media/img/numbers/percent.xpm" /* ** ====== SOUNDS ====== @@ -162,14 +167,14 @@ enum */ # define FT_CHRST_VALID_PARSE "RNSEWFCLMT" -# define FT_CHRST_MAP_ENTRY "0123456789NSEWLT!@+ " +# define FT_CHRST_MAP_ENTRY "0123456789NSEWLT!@+# " # define FT_CHRST_SPRITES "23456789" # define FT_CHRST_SPAWN "NSEW" -# define FT_CHRST_MAP_NON_WALL "023456789NESWLT!@+" +# define FT_CHRST_MAP_NON_WALL "023456789NESWLT!@+#" # define FT_CHRST_COLLISION "123456789 " # define FT_CHRST_DETECT "1L" -# define FT_CHRST_ITEM "!@+" -# define FT_CHRST_WEAPONS "!@" +# define FT_CHRST_ITEM "!@+#" +# define FT_CHRST_WEAPONS "!@#" /* ** ====== BMP ====== @@ -224,6 +229,7 @@ enum # define FT_ERR_TOO_MUCH_TRAPS "too much traps, limit is 512" # define FT_ERR_TOO_MUCH_W_ONE "too much weapon one, limit is 1" # define FT_ERR_TOO_MUCH_W_TWO "too much weapon two, limit is 1" +# define FT_ERR_TOO_MUCH_W_THREE "too much weapon three, limit is 1" /* ** ====== MISSING ERROR MSG ====== @@ -252,15 +258,20 @@ enum # define FT_ERR_MISS_SFX_W_ONE_FIRE "weapon one fire sound effect" # define FT_ERR_MISS_SFX_W_TWO_LOAD "weapon two load sound effect" # define FT_ERR_MISS_SFX_W_TWO_FIRE "weapon two fire sound effect" +# define FT_ERR_MISS_SFX_W_THREE_LOAD "weapon three load sound effect" +# define FT_ERR_MISS_SFX_W_THREE_FIRE "weapon three fire sound effect" # define FT_ERR_MISS_DEATH_SCREEN "death screen image" # define FT_ERR_MISS_HUD_BACK "HUD background image" # define FT_ERR_MISS_HEAL_PACK "heal pack image" -# define FT_ERR_MISS_W_ONE "weapon one image" +# define FT_ERR_MISS_W_ONE "weapon one handed image" # define FT_ERR_MISS_W_ONE_FIRE "weapon one shooting image" -# define FT_ERR_MISS_W_TWO "weapon two image" +# define FT_ERR_MISS_W_TWO "weapon two handed image" # define FT_ERR_MISS_W_TWO_FIRE "weapon two shooting image" -# define FT_ERR_MISS_W_ONE_SPR "weapon one image" -# define FT_ERR_MISS_W_TWO_SPR "weapon one image" +# define FT_ERR_MISS_W_THREE "weapon three handed image" +# define FT_ERR_MISS_W_THREE_FIRE "weapon three shooting image" +# define FT_ERR_MISS_W_ONE_SPR "weapon one sprite image" +# define FT_ERR_MISS_W_TWO_SPR "weapon two sprite image" +# define FT_ERR_MISS_W_THREE_SPR "weapon three sprite image" # define FT_ERR_MISS_NUMBER "number image" /* diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 9b220c1..8c1bb70 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -133,7 +133,7 @@ typedef struct s_player float plane_y; uint8_t fire; int16_t life; - uint8_t has_weapon[2]; + uint8_t has_weapon[3]; int8_t handles_weapon; } t_player; @@ -200,10 +200,10 @@ typedef struct s_map int32_t sprite_order[8][4096]; int32_t traps_nbr; int32_t heals_nbr; - int32_t weaps_nbr[2]; + int32_t weaps_nbr[3]; int32_t traps_order[512]; int32_t heals_order[64]; - int32_t weaps_order[2][1]; + int32_t weaps_order[3][1]; size_t line_chk; size_t map_start; uint8_t isspawn; @@ -214,7 +214,7 @@ typedef struct s_map uint8_t isskybox; uint8_t istraps; uint8_t isheals; - uint8_t isweapon[2]; + uint8_t isweapon[3]; uint8_t darklvl; uint16_t scale; int8_t topsp; @@ -252,14 +252,14 @@ typedef struct s_cub struct s_img death_screen; struct s_rgb f_rgb; struct s_rgb c_rgb; - struct s_img tlist[20]; - struct s_img tweap[4]; + struct s_img tlist[21]; + struct s_img tweap[6]; struct s_img tnum[11]; struct s_sprite **sprites; struct s_sprite traps[512]; struct s_sprite heals[64]; struct s_sprite **weaps; - struct s_sfx sfx[10]; + struct s_sfx sfx[12]; } t_cub; # endif |