Compare commits

..

No commits in common. "dca00e4fb646692f935a95fbded0c3d6c50b0f44" and "f75125295033d30acb43773368047273a2630a22" have entirely different histories.

View File

@ -481,7 +481,7 @@ function zonk_txt(s, x, y, p, md, amt, frms)
frames=frms,
v=v,
}
itv.eff_w=t1:xmax()-1
itv.eff_w=t1:xmax()
return itv
end
@ -566,20 +566,16 @@ fuzzy_stripey = {
mknew(fuzzy_stripey, function(f)
f.fuzz = fuzzy.new{
weight = f.weight or fuzzy_stripey.weight,
interval = f.interval,
tries = f.tries,
interval = f.interval or fuzzy.interval,
tries = f.tries or fuzzy.tries,
}
end)
function fuzzy_stripey:update()
local fz = self.fuzz
fz.weight = self.weight
fz.interval = self.interval
fz.tries = self.tries
self.y += self.dy
if (self.y <= -self.gap) self.y += self.gap
if (self.y >= self.gap) self.y -= self.gap
fz:update()
self.fuzz:update()
end
function fuzzy_stripey:draw()
@ -670,11 +666,11 @@ function breather:draw()
end
end
function breather:matches(x, alwaysmatched)
if (not self.on) return true
if (x==1) return not alwaysmatched and self:starting_reverse()
if (x==2) return not alwaysmatched and self:starting_forward()
if (x==3) return not alwaysmatched and self:starting_reverse() or self:starting_forward()
function breather:matches(x)
if (not x or not self.on) return true
if (x==1) return self:starting_reverse()
if (x==2) return self:starting_forward()
if (x==3) return self:starting_reverse() or self:starting_forward()
return true
end
@ -702,6 +698,7 @@ zonk_mode = {
files={},
lnh = 9,
--space width
spc_w = 0,
spc_full=6,
--text mode
txmd=0x81,
@ -739,7 +736,6 @@ mknew(zonk_mode, function(self)
sep=self.br_sep,
speed=self.br_spd,
}
self.alwaysmatched=true
end)
function zonk_mode:set(_, field,value)
@ -750,8 +746,10 @@ function zonk_mode:g(_, fn, ...)
return _ENV[fn](...)
end
function zonk_mode:at(_, x, y)
--i don't know why i need the
--spc_full offset but i do
self.txt_frame=scootbox.new{
x=x,
x=x-self.spc_full,
from=y-5,
to=y-5-self.exmg,
frames=self.exf,
@ -774,13 +772,6 @@ end
function zonk_mode:bpal(_, p)
self.brth.nextcolors= p == 1 and obvious_breather or bg_breather
end
function zonk_mode:bgdy(_, dy)
self.stripes.dy = dy
end
function zonk_mode:bgwt(_, w)
self.stripes.weight = w
end
function zonk_mode:activate()
clear_alt_pal_bits()
pal()
@ -793,8 +784,6 @@ function zonk_mode:next_file()
if #self.files > 0 then
self.file=split(deli(self.files,1), "\n")
self.expect_cfg_line=true
self.cy=5
self.cx=0
end
end
@ -833,7 +822,7 @@ function zonk_mode:next_item()
return self:next_item()
end
-- parse token
local token = tostr(deli(self.line, 1))
local token = tostr(del(self.line, 1))
while #token == 0 and #self.line > 0 do
-- emit extra spaces
self.cx += self.spc_full
@ -846,7 +835,7 @@ function zonk_mode:next_item()
if (token[1]=="!") token,pp=sub(token,2),sfd_txt_pal
if (token[1]=="#") token,pp=sub(token,2),hlt_txt_pal
local ret = zonk_txt(token,self.cx,self.cy,pp,self.txmd,self.txf,self.txd*cmult)
self.cx = ret.eff_w+self.spc_full
self.cx = ret.eff_w+self.spc_w
return #token,ret
end
@ -860,7 +849,6 @@ function fadetbl(col, tbl, frac)
end
function zonk_mode:update()
if (not self.brth:matches(self.bwt)) self.alwaysmatched=false
if self.playing_text then
self.twt -= 1
if self.twt <= 0 then
@ -887,11 +875,10 @@ function zonk_mode:update()
end
if self.twt <= 0 then
if (btnp(1)) self.confirmed=true
if not self.nextpage and self.confirmed and self.brth:matches(self.bwt, self.alwaysmatched) then
if not self.nextpage and self.confirmed and self.brth:matches(self.bwt) then
self.nextpage = true
self.txt_frame.go = true
self.fpfrm = self.exf
self.alwaysmatched=true
end
else
self.twt -= 1
@ -920,8 +907,8 @@ end
function zonk_mode:draw()
cls(0)
pal(self.p, 1)
if (not self.hide_stripes) self.stripes:draw()
if (not self.hide_breath) self.brth:draw()
self.stripes:draw()
self.brth:draw()
if self.fpfrm then
local ffrac = self.fpfrm/self.exf
fadetbl(12, self.fd12, ffrac)
@ -962,78 +949,6 @@ function fast_awakener:draw()
print("placeholder", 45, 61, 8)
end
count_up=[[bgdy:-0.1 bspd:240 center:3:18
>wITH EVERY COUNT
FROM 1 !UP TO 5,
YOU !WAKE FURTHER.
-----
bgdy:0 center:5:19
>aS YOU !WAKE !UP,
THE WORLD RETURNS.
YOUR MIND IS !NOW
RETURNING TO ITS
USUAL FLOW.
-----
bpal:1 set:bwt:2 center:3:19
!aWAKEN, BECOMING
FULLY ALERT AT THE
>COUNT OF #5...
-----
set:exf:10 set:txf:30 set:txd:45 set:confirmed:1 bgdy:0.1 bspd:225 center:1:1
1
-----
set:confirmed:1 bspd:210 bgdy:0.15 bgwt:10 center:1:1
2
-----
set:confirmed:1 bspd:180 bgdy:0.2 bgwt:12 center:1:1
3
-----
set:confirmed:1 bgdy:0.25 bpal:2 bgwt:14 center:1:1
4
-----
set:confirmed:1 bgdy:0.4 bgwt:16 center:1:1
5
-----
set:hide_breath:1 set:hide_stripes:1 boff set:txf:1 set:txd:0 set:exd:0 set:exf:1 set:bwt:0 center:1:12
wide awake!
]]
function normal_awakener()
return zonk_mode.new{
br_spd=300,
br_cols=bg_breather,
file=[[center:2:15 bon
yOU'VE LEARNED
SO WELL!
-----
center:2:14
yOU'RE SUCH A
!GOOD !TOY!
-----
center:4:19
tAKE A MOMENT TO
JUST !ENJOY HOW
>IT FEELS, TO BE
#VINYL FULL OF #AIR.
-----
center:6:20 bgdy:-0.2
bECAUSE, NEXT, IT'S
>TIME TO #WAKE #UP.
yOU GET TO TAKE YOUR
!HAPPY MOOD AND !VIVID
!MEMORIES OF THIS
EXPERIENCE WITH YOU,
-----
center:4:20 bgdy:-0.15 bspd:270
BUT !ALL THE HYPNOTIC
!SUGGESTIONS FROM
>THIS GAME WILL !FADE
>AS YOU #WAKE #UP.
]],
files={count_up},
}
end
-->8
-- consent screens
@ -1749,7 +1664,6 @@ end
function create_game()
seq = sequencer.new{
{f=normal_awakener},
{
f=zonk_mode.new,
params={{
@ -1760,7 +1674,6 @@ BE A TUTORIAL HERE.]],
txd=0,
txf=1,
cmul=0.25,
hide_stripes=true,
}},
},
{
@ -1797,7 +1710,6 @@ set:bwt:0 set:txd:16 set:txf:20 set:exf:60 center:3:19
THIS ALL YOUR LIFE.]],
}},
},
{f=normal_awakener},
}
end