aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-18 20:14:17 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-18 20:14:17 +0100
commitd1d68677a2b7040d03f33a4e753f1cb5f19070d2 (patch)
tree93127daec0e4ad3e82854ef9479a04a3bee63af2
parentI'm a designer (diff)
download42-cub3d-d1d68677a2b7040d03f33a4e753f1cb5f19070d2.tar.gz
42-cub3d-d1d68677a2b7040d03f33a4e753f1cb5f19070d2.tar.bz2
42-cub3d-d1d68677a2b7040d03f33a4e753f1cb5f19070d2.tar.xz
42-cub3d-d1d68677a2b7040d03f33a4e753f1cb5f19070d2.tar.zst
42-cub3d-d1d68677a2b7040d03f33a4e753f1cb5f19070d2.zip
Checked missings for weaps
-rw-r--r--inc/cub3d_defines.h28
-rw-r--r--src/ft_check_missing.c12
2 files changed, 29 insertions, 11 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index 15ff3b5..1fb5c40 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -85,17 +85,19 @@ 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_DEATH_SCREEN_PATH "./media/img/screens/death_screen.xpm"
-# define FT_HUD_BACK_PATH "./media/img/tex/plate_small.xpm"
-# define FT_WEAPON_ONE_PATH "./media/img/weapons/sword_w.xpm"
-# define FT_WEAPON_TWO_PATH "./media/img/weapons/sword_w.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_DEATH_SCREEN_PATH "./media/img/screens/death_screen.xpm"
+# define FT_HUD_BACK_PATH "./media/img/tex/plate_small.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"
+# define FT_WEAPON_TWO_FIRE_PATH "./media/img/weapons/sword_w_fire.xpm"
/*
** ====== SOUNDS ======
@@ -215,6 +217,10 @@ enum
# define FT_ERR_MISS_SFX_TRAP "missing sound effect trap"
# define FT_ERR_MISS_DEATH_SCREEN "missing death screen image"
# define FT_ERR_MISS_HUD_BACK "missing HUD background image"
+# define FT_ERR_MISS_W_ONE "missing HUD background image"
+# define FT_ERR_MISS_W_ONE_FIRE "missing HUD background image"
+# define FT_ERR_MISS_W_TWO "missing HUD background image"
+# define FT_ERR_MISS_W_TWO_FIRE "missing HUD background image"
/*
** ====== OTHER ======
diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c
index 4d06276..5498058 100644
--- a/src/ft_check_missing.c
+++ b/src/ft_check_missing.c
@@ -59,6 +59,18 @@ static int
if (ft_check_not_found(FT_HUD_BACK_PATH) < 0 ||
ft_check_ext(FT_HUD_BACK_PATH, ".xpm") < 0)
return (ft_missing_error(FT_ERR_MISS_HUD_BACK, clist));
+ if (ft_check_not_found(FT_WEAPON_ONE_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_ONE_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_ONE, clist));
+ if (ft_check_not_found(FT_WEAPON_TWO_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_TWO_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_TWO, clist));
+ if (ft_check_not_found(FT_WEAPON_ONE_FIRE_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_ONE_FIRE_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_ONE_FIRE, clist));
+ if (ft_check_not_found(FT_WEAPON_TWO_FIRE_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_TWO_FIRE_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_TWO_FIRE, clist));
return (ft_check_missing_sprites(clist));
}