From f7d3aeeca6905c424df83cb3075d215393ec8122 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 20:40:54 +0100 Subject: good mapping --- src/ft_draw_life_bar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ft_draw_life_bar.c') 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; -- cgit v1.2.3