aboutsummaryrefslogtreecommitdiff
path: root/plugins/healthbar/healthbar.c
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-06-10 21:35:12 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-06-10 21:35:12 +0200
commit36418bdd6e01504c745770913811fcb174e4df5f (patch)
tree5347d706a6faaf413294189f908079af0603166c /plugins/healthbar/healthbar.c
parent2308ed66087a16b542e9c1a24ea91d8502af463b (diff)
downloaddungeon_game-36418bdd6e01504c745770913811fcb174e4df5f.tar.xz
Center healthbar
Diffstat (limited to 'plugins/healthbar/healthbar.c')
-rw-r--r--plugins/healthbar/healthbar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/healthbar/healthbar.c b/plugins/healthbar/healthbar.c
index 5651051..c66d3f1 100644
--- a/plugins/healthbar/healthbar.c
+++ b/plugins/healthbar/healthbar.c
@@ -7,7 +7,7 @@ static struct color gray;
static void render_healthbar(struct winsize ws)
{
int y = max(ws.ws_row - 2, 0);
- int x = max(ws.ws_col / 2 - player.max_health, 0);
+ int x = max(ws.ws_col / 2 - player.max_health / 2, 0);
printf("\e[%u;%uH", y, x);