From 5dc259c094650f76db1bb22de439ceab00bf58c2 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 18 Aug 2024 01:13:25 -0700 Subject: [PATCH] the Secret Hit Point: you have 1hp when the meter is empty this won't work if your maxhp is 1, will need to special case that --- vacuum_gambit.p8 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vacuum_gambit.p8 b/vacuum_gambit.p8 index 6f4113f..a969ce3 100644 --- a/vacuum_gambit.p8 +++ b/vacuum_gambit.p8 @@ -336,15 +336,12 @@ function drawhud() vertmeter(115,67,118,124,primary_ship.power, primary_ship.max_power, powcols) inset(120,66,125,125) - --line(120,96,125,96,119) - --line(120,97,125,97,85) - --pset(120, 125, 119) -- 57 px vertically local mxs, mxh = primary_ship.maxshield, primary_ship.maxhp - local split = 57 * (mxs / (mxs + mxh)) \ 1 + 66 + local split = 57 * (mxs / (mxs + mxh-1)) \ 1 + 66 line(121, split, 124, split, 0xba) - vertmeter(121,67,124,split-1,primary_ship.shield, primary_ship.maxshield,{204,220,221}) - vertmeter(121,split+1,124,124,primary_ship.hp, primary_ship.maxhp, hpcols) + vertmeter(121,67,124,split-1,primary_ship.shield, mxs,{204,220,221}) + vertmeter(121,split+1,124,124,primary_ship.hp-1, mxh-1, hpcols) fillp(0) end