Compare commits

..

No commits in common. "33fede4ed82f277b0dc8e7b9cc34fe96ee75b2df" and "78b200272e54973b37a91005dbff43080bcd1353" have entirely different histories.

View File

@ -378,10 +378,8 @@ function drawhud()
else
vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols)
end
-- 60 px vertically. note that
-- there was at one point an
-- off-by-one and I'm not sure
-- it's actually fixed
-- 59 px vertically? or 60? off-by-1 error somewhere here or in vertmeter?
-- it's here. I think
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp
if (mxs > 0) and (mxh > 0) then
local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64
@ -487,15 +485,14 @@ function ship_m:die()
local sz4 = self.size * 4
local cx, cy, xp, z = self.x + sz4, self.y + sz4, self.xp or 0, 0
boom(cx, cy, 3*sz4, self.boss)
if xp > 0x0.01f3 then -- dec 499
if xp > 499 then
-- spawn a huge gem with all
-- overage XP, min 100
spawn_xp_at(cx, cy, 0, xp-0x0.18f)
xp = 0x0.18f -- dec 399
spawn_xp_at(cx, cy, 0, xp-399)
xp = 399
z += 1
end
-- 100, 25, 5, 1
for gsz in all{0x0.0064, 0x0.0019, 0x0.0005, 0x0.0001} do
for gsz in all{100, 25, 5, 1} do
while xp >= gsz do
spawn_xp_at(cx, cy, z, gsz)
xp -= gsz
@ -953,9 +950,9 @@ player = mknew(ship_m.new{
shield = 2, -- regenerates
maxshield = 2,
-- xp in increments of 0x0.0001
-- xp; watch out for 16-bit range limits
xp = 0,
xptarget = 0x0.0004,
xptarget = 4,
level = 1,
-- gun
@ -1013,7 +1010,7 @@ frownie = mknew(ship_m.new{
sparkodds = 8,
hp = 0.5, -- enemy ships need no max hp
xp = 0x0.0001,
xp = 1,
-- position
x=60, -- x and y are for upper left corner
@ -1035,7 +1032,7 @@ frownie = mknew(ship_m.new{
blocky = mknew(frownie.new{
sprite = 10,
hp = 1.5,
xp = 0x0.0002,
xp = 2,
hurt = {
x_off = 0,
y_off = 0,
@ -1055,7 +1052,7 @@ blocky = mknew(frownie.new{
spewy = mknew(frownie.new{
sprite=26,
xp = 0x0.0003,
xp = 3,
hurt = {
x_off=0,
y_off=1,
@ -1076,7 +1073,7 @@ spewy = mknew(frownie.new{
chasey = mknew(ship_m.new{
sprite = 5,
xp = 0x0.0004,
xp = 4,
size = 1,
hurt = {
x_off = 1,
@ -1111,7 +1108,7 @@ end
xl_chasey=mknew(chasey.new{
size=2,
xp = 0x0.000a,
xp = 10,
maxspd=1.25,
hurt = {
x_off = 2,
@ -1609,7 +1606,7 @@ function spawn_xp_at(x, y, off, amt)
x += rnd(off+off)-off
y += rnd(off+off)-off
xp_gem.new{
qsprite=amt == 0x0.0001 and 32 or amt == 0x0.0005 and 33 or amt == 0x0.0019 and 34 or 35,
qsprite=amt == 1 and 32 or amt == 5 and 33 or amt == 25 and 34 or 35,
val = amt,
}:spawn_at(mid(x, 0, 124),mid(y,-4,125))
end