aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_hud.c6
-rw-r--r--src/ft_init_lists.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c
index 46662fa..038d1f2 100644
--- a/src/ft_draw_hud.c
+++ b/src/ft_draw_hud.c
@@ -61,7 +61,7 @@ static void
*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;
if (!(y % 3))
{
- if (col < 0x00AAAAAA)
+ if (col < 0x00aaaaaa)
col += 0x00010101;
}
y++;
@@ -90,7 +90,7 @@ static void
*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;
if (!(y % 2))
{
- if (col < 0x00AAAAAA)
+ if (col < 0x00aaaaaa)
col += 0x00010101;
}
y++;
@@ -110,4 +110,6 @@ void
ft_draw_hud_back_top_r(clist->mlist->map_h,
clist->mlist->map_w, clist->wlist, clist);
ft_draw_map(clist->mlist->map, clist);
+ ft_draw_life_bar(clist->mlist->map_w, clist->mlist->scale,
+ clist->plist->life, clist);
}
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index 5592358..b9dbfd3 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -45,6 +45,7 @@ static t_player
plist->dir_y = 0;
plist->plane_x = 0;
plist->plane_y = 0.66666666;
+ plist->life = 100;
return (plist);
}