aboutsummaryrefslogtreecommitdiffstats
path: root/inc/cub3d_defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/cub3d_defines.h')
-rw-r--r--inc/cub3d_defines.h140
1 files changed, 82 insertions, 58 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index 01fa291..4ef2391 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -15,16 +15,18 @@
/*
** ====== RETURN VALUES ======
-*/
-
-/*
+**
** ret vals:
+** ---------
** 1: no argv[1]
-** 2: failed structs init
-** 3: failed mlx init
-** 4: map error
-** 5: no map
-** 6: read error
+** 2: allocation error
+** 3: failed structs init
+** 4: failed mlx init
+** 5: map error
+** 6: no map
+** 7: read error
+** 8: bmp related error
+** 9: missing some media files
*/
enum
@@ -43,9 +45,7 @@ enum
/*
** ====== OS ======
-*/
-
-/*
+**
** 1: Darwin
** 2: Linux
*/
@@ -72,6 +72,7 @@ enum
# define FT_SPC_KEY 49
# define FT_ONE_KEY 18
# define FT_TWO_KEY 19
+# define FT_THREE_KEY 20
# else
# define FT_W_KEY 119
# define FT_A_KEY 97
@@ -86,44 +87,54 @@ enum
# define FT_SPC_KEY 32
# define FT_ONE_KEY 49
# define FT_TWO_KEY 50
+# define FT_THREE_KEY 51
# endif
/*
** ====== 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/double_b_load.wav"
+# define FT_SFX_W_THREE_FIRE_PATH "./media/sound/sfx/double_b_fire.wav"
+# define FT_SFX_OOA_PATH "./media/sound/sfx/ooa.wav"
+# define FT_DEATH_SCREEN_PATH "./media/img/screens/death_screen.xpm"
+# define FT_HUD_BACK_PATH "./media/img/hud/hud_back.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_fire.xpm"
+# define FT_HEAL_PACK_PATH "./media/img/sprites/first_aid.xpm"
+# define FT_ZER_PATH "./media/img/hud/zero.xpm"
+# define FT_ONE_PATH "./media/img/hud/one.xpm"
+# define FT_TWO_PATH "./media/img/hud/two.xpm"
+# define FT_THR_PATH "./media/img/hud/three.xpm"
+# define FT_FOU_PATH "./media/img/hud/four.xpm"
+# define FT_FIV_PATH "./media/img/hud/five.xpm"
+# define FT_SIX_PATH "./media/img/hud/six.xpm"
+# define FT_SEV_PATH "./media/img/hud/seven.xpm"
+# define FT_EIG_PATH "./media/img/hud/eight.xpm"
+# define FT_NIN_PATH "./media/img/hud/nine.xpm"
+# define FT_PER_PATH "./media/img/hud/percent.xpm"
+# define FT_INF_PATH "./media/img/hud/infinite.xpm"
+# define FT_CAP_HEALTH_PATH "./media/img/hud/health.xpm"
+# define FT_CAP_AMMO_PATH "./media/img/hud/ammo.xpm"
/*
** ====== SOUNDS ======
@@ -139,9 +150,9 @@ enum
** ====== MOVE SPEED ======
*/
-# define FT_MOVE_SPEED 0.28
-# define FT_STRAFE_SPEED 0.28
-# define FT_ROT_SPEED 0.28
+# define FT_MOVE_SPEED 0.18
+# define FT_STRAFE_SPEED 0.15
+# define FT_ROT_SPEED 0.15
/*
** ====== COLLISION ======
@@ -162,14 +173,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 +235,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,25 +264,37 @@ 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_SFX_OOA "out of ammunitions 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"
+# define FT_ERR_MISS_H_CAPTION "health caption"
+# define FT_ERR_MISS_A_CAPTION "ammo caption"
/*
** ====== OTHER ======
*/
# define FT_PARSE_END_RET 25
-# define FT_STRT_LIFE 200
-# define FT_TRAP_DAMAGE_AMOUNT 27
-# define FT_HEAL_PACK_AMOUNT 19
-# define FT_BOUNCE_FACTOR 8
+# define FT_STRT_LIFE 250
+# define FT_TRAP_DAMAGE_AMOUNT 45
+# define FT_HEAL_PACK_AMOUNT 20
+# define FT_BOUNCE_FACTOR 4
+# define FT_WEAP_ONE_STRT_AMMO -4
+# define FT_WEAP_TWO_STRT_AMMO 30
+# define FT_WEAP_THREE_STRT_AMMO 24
+# define FT_WEAP_MAX_AMMO 1000
# endif