aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-06 15:31:58 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-06 15:31:58 +0200
commit7359ab92230a7b4f05855de50f36aa4880901f3b (patch)
treec5de0e375f3f49d308950b24e199591dd8a2c1a8 /inc
parentTweak (diff)
download42-cub3d-7359ab92230a7b4f05855de50f36aa4880901f3b.tar.gz
42-cub3d-7359ab92230a7b4f05855de50f36aa4880901f3b.tar.bz2
42-cub3d-7359ab92230a7b4f05855de50f36aa4880901f3b.tar.xz
42-cub3d-7359ab92230a7b4f05855de50f36aa4880901f3b.tar.zst
42-cub3d-7359ab92230a7b4f05855de50f36aa4880901f3b.zip
Better sound handling, few changes
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d.h12
-rw-r--r--inc/cub3d_defines.h4
-rw-r--r--inc/cub3d_structs.h2
3 files changed, 12 insertions, 6 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index 15d9ef0..5ae96c4 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -214,6 +214,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_two_fire_alt(t_sfx *sfx);
+void ft_sfx_weapon_two_fire_alt_alt(t_sfx *sfx);
void ft_sfx_weapon_three_load(t_sfx *sfx);
void ft_sfx_weapon_three_fire(t_sfx *sfx);
void ft_sfx_ooa(t_sfx *sfx);
@@ -226,10 +228,12 @@ void *ft_sfx_new_lvl_thread(void *vargp);
void *ft_sfx_pain_thread(void *vargp);
void *ft_sfx_trap_thread(void *vargp);
void *ft_sfx_heal_thread(void *vargp);
-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_w_one_load_thread(void *vargp);
+void *ft_sfx_w_one_fire_thread(void *vargp);
+void *ft_sfx_w_two_load_thread(void *vargp);
+void *ft_sfx_w_two_fire_thread(void *vargp);
+void *ft_sfx_weapon_two_fire_thread_alt(void *vargp);
+void *ft_sfx_weapon_two_fire_thread_alt_alt(void *vargp);
void *ft_sfx_weapon_three_load_thread(void *vargp);
void *ft_sfx_weapon_three_fire_thread(void *vargp);
void *ft_sfx_ooa_thread(void *vargp);
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index 1f1134b..be48fbe 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -312,12 +312,13 @@ enum
# define FT_WEAP_ONE_STRT_AMMO -4
# define FT_WEAP_TWO_STRT_AMMO 30
# define FT_WEAP_THREE_STRT_AMMO 10
+# define FT_AMMO_PACK 6
# define FT_WEAP_MAX_AMMO 1000
# define FT_ENMY_STRT_LIFE 10
# define FT_ENMY_SIGHT_RANGE 8.5
# define FT_ENMY_DAMAGE_AMOUNT 14
# define FT_WEAP_ONE_VEL 900.0
-# define FT_WEAP_TWO_VEL 400.0
+# define FT_WEAP_TWO_VEL 450.0
# define FT_WEAP_THREE_VEL 1400.0
# define FT_W_ONE_DANAGE_AMOUNT 5
# define FT_W_TWO_DANAGE_AMOUNT 3
@@ -329,5 +330,6 @@ enum
# define FT_PARSE_END_RET 25
# define FT_TOTAL_SPRT 14
+# define FT_TOTAL_SFX 18
# endif
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 4666cf9..de2c51c 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -274,7 +274,7 @@ typedef struct s_cub
struct s_img tweap[6];
struct s_img tnum[12];
struct s_sprite **sprites;
- struct s_sfx sfx[16];
+ struct s_sfx sfx[FT_TOTAL_SFX];
struct s_bad_boy *bad_boy;
} t_cub;