Compare commits

..

No commits in common. "6b8efe3438767d44a6d5f23ed8f4f753acb867bc" and "eebd84544b69a1748f7a354411c4de163f00d662" have entirely different histories.

View File

@ -320,7 +320,6 @@ function drawgame()
end end
powcols=split"170,154,153,148,68" powcols=split"170,154,153,148,68"
shlcols = split"204,220,221"
function drawhud() function drawhud()
-- 112-and-right is hud zone -- 112-and-right is hud zone
rectfill(112, 0, 127, 127,0x56) rectfill(112, 0, 127, 127,0x56)
@ -338,16 +337,12 @@ function drawhud()
inset(120,66,125,125) inset(120,66,125,125)
-- 57 px vertically -- 57 px vertically
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp local mxs, mxh = primary_ship.maxshield, primary_ship.maxhp
if (mxs > 0) and (mxh > 1) then if mxs + mxh > 1 then
local split = 57 * (mxs / (mxs + mxh-1)) \ 1 + 66 local split = 57 * (mxs / (mxs + mxh-1)) \ 1 + 66
line(121, split, 124, split, 0xba) line(121, split, 124, split, 0xba)
vertmeter(121,67,124,split-1,cs, mxs,shlcols) vertmeter(121,67,124,split-1,primary_ship.shield, mxs,{204,220,221})
vertmeter(121,split+1,124,124,ch-1, mxh-1, hpcols) vertmeter(121,split+1,124,124,primary_ship.hp-1, mxh-1, hpcols)
elseif mxs > 0 then
vertmeter(121,67,124,124,cs,mxs,shlcols)
elseif mxh > 1 then
vertmeter(121,67,124,124,ch-1,mxh-1,hpcols)
else else
print("!", 122, 94, 9) print("!", 122, 94, 9)
print("!", 121, 93, 8) print("!", 121, 93, 8)