Compare commits

..

No commits in common. "e69ae6f37e9aba858c769b32313e68ecb245bdd0" and "1529548d61d6cd3081259551f921ca4f06f81cfc" have entirely different histories.

View File

@ -305,27 +305,19 @@ end
-- text rendering
-- text colors for zonk mode:
-- 8 -- standard
-- 9 -- delayed fade
-- 10 -- currently fading in
txtbox = {
x=0,
y=0,
f=0,
interval=4,
text="???",
col=8,
mode=0x81,
}
mknew(txtbox, function(self)
if (not self.cols) self.cols = {14,10,9,8}
self.c = deli(self.cols)
end)
mknew(txtbox)
function txtbox:update()
if #self.cols > 0 then
self.f += 1
if self.f >= self.interval then
self.f = 0
self.col = deli(self.cols)
end
end
end
function txtbox:update() end
function txtbox:draw()
poke(0x5f58, self.mode)
@ -419,49 +411,6 @@ function scootbox:draw()
return self.v:draw()
end
nrm_txt_pal = split"14,10,9,8"
sfd_txt_pal = split"15,10,9,8"
hlt_txt_pal = split"13,11,9,8"
shd_txt_pal = split"12,12,1,0"
function cparr(t)
local ret = {}
for i,x in ipairs(t) do
ret[i]=x
end
return ret
end
function zonk_txt(s, x, y, p, md, amt, frms)
md = md or 0x80
frms = frms or 0
amt = amt or 0
local itv = (frms>>2)&0x7ff
local v = view.of{
txtbox.new{
x=x+1,
y=y+1,
interval=itv,
cols=cparr(shd_txt_pal),
mode=md,
text=s,
},
txtbox.new{
x=x,
y=y,
interval=itv,
cols=cparr(p),
mode=md,
text=s,
},
}
return spring.new{
from=-amt,
frames=frms,
v=v,
}
end
-->8
-- zonk renderer
@ -538,7 +487,7 @@ fuzzy_stripey = {
weight = 12,
spacing = 7,
gap = 32,
colors = split"3,5,2,1",
colors = {5, 2, 1},
}
mknew(fuzzy_stripey, function(f)
f.fuzz = fuzzy.new{
@ -588,10 +537,8 @@ function cminskycirc(r,c)
pset(63.5+r,63.5)
end
obvious_breather=split"2,3,4,3,2"
bg_breather=split"1,2,4,2,1"
breather = {
colors = obvious_breather,
colors = {1,2,4,2,1},
sep = 8,
speed=240,
f=0,
@ -638,39 +585,6 @@ function breather:starting_reverse()
return self.f + self.speed < self.sep * #self.colors
end
def_z_pal = {
[0]=0,129,1,2,4,5,6,7,1,5,6,140,2,13,7,7
}
def_14_fade = split"0,128,129,133,141,13,6,15,135,7"
def_15_fade = split"0,128,129,133,141,13,13,6,6,15,15,136,135,7"
def_13_fade = split"0,128,129,133,141,140,140,13,13,12"
def_shd_fade = split"0,128,130,141,2"
zonk_mode = {}
mknew(zonk_mode, function(self)
self.stripes=fuzzy_stripey.new{}
self.brth=breather.new{}
-- test renderer
clear_alt_pal_bits()
pal()
pal(self.p or def_z_pal, 1)
self.brth.go = true
self.txtwnd = zonk_txt("tEXT tEST", 40, 60, nrm_txt_pal, 0x81, 32, 30)
end)
function zonk_mode:update()
self.stripes:update()
self.brth:update()
self.txtwnd:update()
end
function zonk_mode:draw()
cls(0)
self.stripes:draw()
self.brth:draw()
self.txtwnd:draw()
end
-->8
-- awakener
@ -1013,8 +927,7 @@ function toyphin:draw()
spr(st.s[1+(((t()<<1)&0x0.FFFF*#st.s)&0x7FFF)], self.x + st.xo, y + st.yo, self.state.ws, self.state.hs)
end
-->8
-- arcade mode
-->8 word target
wordtarget = {
x = 129,
@ -1051,6 +964,9 @@ function wordtarget:draw()
print(self.str, self.x, self.y, 0x100a)
end
-->8
-- arcade mode
-- palette use:
-- 0: shallow sea blue (1)
-- 1: black (for sprites)
@ -1315,8 +1231,15 @@ function start_game()
-- }}
-- },
{
f = zonk_mode.new,
params={},
f = function()
pal()
clear_alt_pal_bits()
return view.of{
bg.new(),
fuzzy_stripey.new{interval=7, tries=5},
breather.new{on=true},
}
end,
},
}
seq:next()