aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 23:42:05 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 23:42:05 +0100
commit1e84a8792302f0446e8eb838f478b4a6564d1011 (patch)
tree1968ab8d402596dc710afa4cf70335687e64637b /inc
parentCleaner (diff)
download42-cub3d-1e84a8792302f0446e8eb838f478b4a6564d1011.tar.gz
42-cub3d-1e84a8792302f0446e8eb838f478b4a6564d1011.tar.bz2
42-cub3d-1e84a8792302f0446e8eb838f478b4a6564d1011.tar.xz
42-cub3d-1e84a8792302f0446e8eb838f478b4a6564d1011.tar.zst
42-cub3d-1e84a8792302f0446e8eb838f478b4a6564d1011.zip
I think we good
Diffstat (limited to '')
-rw-r--r--inc/cub3d.h2
-rw-r--r--inc/cub3d_defines.h26
-rw-r--r--inc/cub3d_structs.h8
3 files changed, 22 insertions, 14 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index b9e0667..0ca77d9 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -63,6 +63,7 @@ void ft_death_hooks(t_win *wl, t_cub *cl);
*/
void ft_wall_tex_init(t_cub *cl);
+void ft_next_sprite_init(t_cub *cl);
void ft_weap_tex_init(t_cub *cl);
void ft_num_tex_init(t_cub *cl);
@@ -74,6 +75,7 @@ void ft_draw_square(int a, int b, int rgb, t_cub *clist);
void ft_draw_map(char **map, t_cub *clist);
void ft_draw_texture(t_cub *cl, int x, int y, int tex_y);
int8_t ft_draw_hud(t_cub *clist);
+void ft_draw_health_caption(t_cub *cl);
void ft_draw_life_bar(t_cub *cl);
void ft_draw_scene(t_cub *clist);
void ft_draw_scene_bmp(t_cub *clist);
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index e577ebf..7df3de3 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -120,17 +120,19 @@ enum
# 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/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_ZER_PATH "./media/img/captions/zero.xpm"
+# define FT_ONE_PATH "./media/img/captions/one.xpm"
+# define FT_TWO_PATH "./media/img/captions/two.xpm"
+# define FT_THR_PATH "./media/img/captions/three.xpm"
+# define FT_FOU_PATH "./media/img/captions/four.xpm"
+# define FT_FIV_PATH "./media/img/captions/five.xpm"
+# define FT_SIX_PATH "./media/img/captions/six.xpm"
+# define FT_SEV_PATH "./media/img/captions/seven.xpm"
+# define FT_EIG_PATH "./media/img/captions/eight.xpm"
+# define FT_NIN_PATH "./media/img/captions/nine.xpm"
+# define FT_PER_PATH "./media/img/captions/percent.xpm"
+# define FT_CAP_HEALTH_PATH "./media/img/captions/health.xpm"
+# define FT_CAP_AMMO_PATH "./media/img/captions/ammo.xpm"
/*
** ====== SOUNDS ======
@@ -275,6 +277,8 @@ enum
# 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 ======
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 8c1bb70..babf3be 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -239,8 +239,10 @@ typedef struct s_cub
pthread_t mtid;
int8_t isdead;
uint8_t moves;
- uint16_t h;
- uint16_t w;
+ uint16_t life_cap_h;
+ uint16_t life_cap_w;
+ uint16_t life_num_h;
+ uint16_t life_num_w;
int (*key_ptr[6])(struct s_cub*);
int8_t (*get_ptr[14])(char**, struct s_cub*);
char ref[22][3];
@@ -252,7 +254,7 @@ typedef struct s_cub
struct s_img death_screen;
struct s_rgb f_rgb;
struct s_rgb c_rgb;
- struct s_img tlist[21];
+ struct s_img tlist[23];
struct s_img tweap[6];
struct s_img tnum[11];
struct s_sprite **sprites;