Compare commits

..

No commits in common. "5870c129eb6ea8650306d9aa6e583c7a96a832a1" and "804eb62ae74343892047994e31b9c2afd1d0e3ae" have entirely different histories.

View File

@ -337,32 +337,30 @@ function drawhud()
line(113,127) line(113,127)
draw_gun_info("❎",1,116,3,primary_ship.main_gun) draw_gun_info("❎",1,116,3,primary_ship.main_gun)
draw_gun_info("🅾️",1,116,29,primary_ship.special_gun) draw_gun_info("🅾️",1,116,31,primary_ship.special_gun)
inset(114,57,119,118) dropshadow("x h",114,59,1)
rectfill(119,57,125,58,13) inset(114,66,119,125)
inset(120,64,125,125)
rectfill(114,124,120,125,13)
print("XP",120,56,1)
print("HP",113,121,1)
fillp(0x5a5a) fillp(0x5a5a)
vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols) vertmeter(115,67,118,124,primary_ship.xp, primary_ship.xptarget, powcols)
-- 59 px vertically
inset(120,66,125,125)
-- 57 px vertically
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp
if (mxs > 0) and (mxh > 0) then if (mxs > 0) and (mxh > 0) then
local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64 local split = 57 * (mxs / (mxs + mxh)) \ 1 + 66
line(121, split, 124, split, 0xba) line(121, split, 124, split, 0xba)
vertmeter(121,65,124,split-1,cs, mxs,shlcols) vertmeter(121,67,124,split-1,cs, mxs,shlcols)
vertmeter(121,split+1,124,124,ch, mxh, hpcols) vertmeter(121,split+1,124,124,ch, mxh, hpcols)
elseif mxs > 0 then elseif mxs > 0 then
vertmeter(121,65,124,124,cs,mxs,shlcols) vertmeter(121,67,124,124,cs,mxs,shlcols)
elseif mxh > 0 then elseif mxh > 0 then
vertmeter(121,65,124,124,ch,mxh,hpcols) vertmeter(121,67,124,124,ch,mxh,hpcols)
else else
print("!", 122, 93, 9) print("!", 122, 94, 9)
print("!", 121, 92, 8) print("!", 121, 93, 8)
end end
fillp(0) fillp(0)
end end
function draw_gun_info(lbl,fgc,x,y,gun) function draw_gun_info(lbl,fgc,x,y,gun)