aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_life_bar.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-11 20:40:54 +0100
committerRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-11 20:40:54 +0100
commitf7d3aeeca6905c424df83cb3075d215393ec8122 (patch)
tree8b25841c14fb59839d36ffc0baa27d44ee066957 /src/ft_draw_life_bar.c
parentlife is bav (diff)
download42-cub3d-f7d3aeeca6905c424df83cb3075d215393ec8122.tar.gz
42-cub3d-f7d3aeeca6905c424df83cb3075d215393ec8122.tar.bz2
42-cub3d-f7d3aeeca6905c424df83cb3075d215393ec8122.tar.xz
42-cub3d-f7d3aeeca6905c424df83cb3075d215393ec8122.tar.zst
42-cub3d-f7d3aeeca6905c424df83cb3075d215393ec8122.zip
good mapping
Diffstat (limited to 'src/ft_draw_life_bar.c')
-rw-r--r--src/ft_draw_life_bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c
index ed270f9..501fd71 100644
--- a/src/ft_draw_life_bar.c
+++ b/src/ft_draw_life_bar.c
@@ -26,7 +26,8 @@ static void
x = (cl->mlist.map_w * scl) + 20 + 9;
while (x < (cl->mlist.map_w * scl) + 20 + ((3 * scl) - 9))
{
- y = (wl->y_size - (cl->mlist.map_h * scl) - 20 + 9) + ((100 - cl->plist.life) * (h / (cl->mlist.map_h * scl) - 1));
+ y = (wl->y_size - (cl->mlist.map_h * scl) - 20 + 9)
+ + ((100 - cl->plist.life) * (h / (cl->mlist.map_h * scl) - 1));
while (y < wl->y_size - 9)
{
*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline))) = col;