aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-13 01:44:22 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-13 01:44:22 +0100
commitb744a677218df528502b5eb769a52ef294ebbac6 (patch)
tree9e3f733698197d975c26e838e73e4283b02a87c8 /inc
parentReduced musics volume (diff)
download42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.gz
42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.bz2
42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.xz
42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.zst
42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.zip
Added sound effects files
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d_defines.h34
-rw-r--r--inc/cub3d_structs.h11
2 files changed, 42 insertions, 3 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index 1c2c39c..588670d 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -80,13 +80,34 @@ enum
# endif
/*
-** ====== MUSIC CMD ======
+** ====== SOUNDS ======
*/
+# 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_SCR_TRAP_PATH "./media/sound/sfx/trap.wav"
# if FT_OS == 1
-# define FT_SND_CMD "/usr/bin/afplay --volume 0.2 %s"
+# define FT_MUS_CMD "/usr/bin/afplay --volume 0.2 %s"
+# define FT_SFX_DEATH "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/death_screen.wav"
+# define FT_SFX_FS_ONE "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/footstep_one.wav"
+# define FT_SFX_FS_TWO "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/footstep_two.wav"
+# define FT_SFX_N_LVL "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/next_lvl.wav"
+# define FT_SFX_PAIN_ONE "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/scream_one.wav"
+# define FT_SFX_PAIN_TWO "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/scream_two.wav"
+# define FT_SFX_TRAP "/usr/bin/afplay --volume 0.2 ./media/sound/sfx/trap.wav"
# else
-# define FT_SND_CMD "/usr/bin/aplay -f cd -t wav -q %s"
+# define FT_MUS_CMD "/usr/bin/aplay -f cd -t wav -q %s"
+# define FT_SFX_DEATH "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/death_screen.wav"
+# define FT_SFX_FS_ONE "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/footstep_one.wav"
+# define FT_SFX_FS_TWO "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/footstep_two.wav"
+# define FT_SFX_N_LVL "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/next_lvl.wav"
+# define FT_SFX_PAIN_ONE "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/scream_one.wav"
+# define FT_SFX_PAIN_TWO "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/scream_two.wav"
+# define FT_SFX_TRAP "/usr/bin/aplay -f cd -t wav -q ./media/sound/sfx/trap.wav"
# endif
/*
@@ -190,6 +211,13 @@ enum
# define FT_ERR_MISS_CEIL_C "ceiling color"
# define FT_ERR_MISS_PLAYER_SPAWN "player spawn"
# define FT_ERR_MISS_TRAP "traps"
+# define FT_ERR_MISS_SFX_DEATH "missing sound effect death"
+# define FT_ERR_MISS_SFX_FS_ONE "missing sound effect footstep one"
+# define FT_ERR_MISS_SFX_FS_TWO "missing sound effect footstep two"
+# define FT_ERR_MISS_SFX_N_LVL "missing sound effect new level"
+# define FT_ERR_MISS_SFX_SCR_ONE "missing sound effect scream one"
+# define FT_ERR_MISS_SFX_SCR_TWO "missing sound effect scream two"
+# define FT_ERR_MISS_SFX_TRAP "missing sound effect trap"
/*
** ====== OTHER ======
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index dd652ee..e1ca235 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -55,6 +55,17 @@ typedef struct s_bmp_info
uint32_t colors_important;
} t_bmp_info;
+typedef struct s_sfx
+{
+ char **death;
+ char **footstep_one;
+ char **footstep_two;
+ char **new_lvl;
+ char **pain_one;
+ char **pain_two;
+ char **trap;
+} t_sfx;
+
typedef struct s_bmp_rgb
{
uint8_t r;