Compare commits

..

No commits in common. "086abfeb7191eb6dda19d877b9dd7f6a486e315e" and "ca7517cc3ae95a03420f2e82425d741c21d340c2" have entirely different histories.

View File

@ -619,7 +619,7 @@ mknew(sea)
function sea:draw()
local w = wave()
rectfill(0, 72+w, 128, 80+w, 0)
rectfill(0, 64+w, 128, 80+w, 0)
poke2(0x5f78, 0xFF00.00FF <<> w)
rectfill(0, 81+w, 128, 89+w, 0x1040.a842)
rectfill(0, 90+w, 128, 97+(w>>1), 0x1004.e169)
@ -676,7 +676,7 @@ function arcade_level:draw_splash(x, force)
local n = (force + rnd(force)) & 0x7FF
for i=0,n do
local d = droplet.new{x=x, force=force, y=72+wave(), f=i/n-0.5}
if rnd() < 0.5 then
if d.dr < 0 then
self.bg:push_back(d)
else
self.fg:push_back(d)
@ -704,25 +704,27 @@ function arcade_level:landing_splash(x, force, harder)
self:draw_splash(x, force)
end
splashcols = {0x1003, 0x103d.a5a5}
droplet = {}
mknew(droplet, function(d)
d.dx = (d.f * d.force >> 2) - 0.75
d.dx = d.f * d.force >> 2
d.x += 16 * d.f
d.dy = -rnd(d.force*0.66)
d.r = 1 + rnd(0.75 + (d.force >> 4))
d.dy = -rnd(d.force>>1)
d.r = rnd(1) + 1
d.dr = rnd(0.025) - 0.0125
d.ymo = 255 * d.dr
d.c = rnd(splashcols)
end)
function droplet:update()
self.x += self.dx
self.y += self.dy
self.r += self.dr
self.dy += 0.3
return self.y >72 + wave()
return self.y > self.ymo + 72 + wave() or self.r < 0.5
end
function droplet:draw()
circfill(self.x, self.y, self.r, self.c)
circfill(self.x, self.y, self.r, 0x1003)
local r2 = self.r >> 1
pset(self.x+r2, self.y-r2, 0x100F)
end