adjust HUD

Health and shields now share one bar. one hit point is (about) the same
size in each. There is an indicator splitting the two categories of HP.
This commit is contained in:
2024-08-18 01:10:20 -07:00
parent c5e49740c4
commit 51629376f2

View File

@ -328,19 +328,23 @@ function drawhud()
line(113,127)
draw_gun_info("❎",1,116,3,primary_ship.main_gun)
draw_gun_info("🅾️",2,116,31,primary_ship.special_gun)
draw_gun_info("🅾️",1,116,31,primary_ship.special_gun)
dropshadow("pwr",114,59,1)
dropshadow("p h",114,59,1)
inset(114,66,119,125)
fillp(0x5a5a)
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)
vertmeter(121,67,124,95,primary_ship.shield, primary_ship.maxshield,{204,220,221})
vertmeter(121,98,124,124,primary_ship.hp, primary_ship.maxhp, hpcols)
--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
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)
fillp(0)
end