Compare commits

..

No commits in common. "cc3ed20f7656af5851e15a1b51f0c15cea8ac28e" and "c5e49740c4d44b747a72fb4687afccf624585778" have entirely different histories.

View File

@ -328,25 +328,19 @@ function drawhud()
line(113,127)
draw_gun_info("❎",1,116,3,primary_ship.main_gun)
draw_gun_info("🅾️",1,116,31,primary_ship.special_gun)
draw_gun_info("🅾️",2,116,31,primary_ship.special_gun)
dropshadow("p h",114,59,1)
dropshadow("pwr",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)
-- 57 px vertically
local mxs, mxh = primary_ship.maxshield, primary_ship.maxhp
if mxs + mxh > 1 then
local split = 57 * (mxs / (mxs + mxh-1)) \ 1 + 66
line(121, split, 124, split, 0xba)
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)
else
print("!", 122, 94, 9)
print("!", 121, 93, 8)
end
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)
fillp(0)
end
@ -373,9 +367,9 @@ function draw_gun_info(lbl,fgc,x,y,gun)
end
function vertmeter(x0,y0,x1,y1,val,maxval,cols)
if ((val <= 0) or (maxval <= 0)) return
if (val <= 0) return
local h = y1-y0
local px = val/maxval * h \ 1
local px = -flr(-(h*val)\maxval)
local ncols = #cols
local firstcol = ((h-px)*ncols\h)+1
local lastbottom = y0+(h*firstcol\ncols)
@ -568,7 +562,6 @@ function ship_m:refresh_shield()
if (lframe < self.shield_refresh_ready) return
if (self.power < self.shieldcost) return
self.shield += 1
self.shield = min(self.shield, self.maxshield)
self.power -= self.shieldcost
self.shield_refresh_ready = lframe + self.shieldcooldown
end
@ -912,11 +905,6 @@ player = ship_m.new{
mknew(player,
function(p)
p.main_gun = zap_gun.new()
-- ONE HIT MODE
-- p.hp = 1
-- p.maxhp = 1
-- p.shield = 0
-- p.maxshield = 0
end
)