Compare commits
19 Commits
trans_prid
...
fb1bfe7c0d
Author | SHA1 | Date | |
---|---|---|---|
fb1bfe7c0d
|
|||
00d37880bb
|
|||
16aa48a4ab
|
|||
3022d3cb3d
|
|||
f37476f148
|
|||
e97cfc0fec
|
|||
83685b19e8
|
|||
e69ae6f37e
|
|||
38bac54ff0
|
|||
1529548d61
|
|||
873722b1ac
|
|||
db7ce90182
|
|||
ebf8c3921e
|
|||
033a71d767
|
|||
ff60db72ad
|
|||
ef59dc3f6a
|
|||
d5647a0328
|
|||
a659679b6b
|
|||
cc4b6bffd3
|
652
vacation.p8
652
vacation.p8
@ -130,6 +130,10 @@ end
|
||||
|
||||
function nop() end
|
||||
|
||||
blank = {}
|
||||
function blank:update() end
|
||||
function blank:draw() end
|
||||
|
||||
-- puke emits a verbose string
|
||||
-- describing item, indented to
|
||||
-- the specified depth (0 by
|
||||
@ -244,16 +248,43 @@ function _init()
|
||||
-- complex fill API mode
|
||||
poke(0x5f34, 1)
|
||||
|
||||
font_dogica()
|
||||
mainview = newtitle()
|
||||
awakener_hold_frames = 0
|
||||
mainview = ao_splash.new()
|
||||
end
|
||||
|
||||
function _update60()
|
||||
if awakener_armed then
|
||||
if btn() & 0x30 > 0 then
|
||||
awakener_hold_frames += 1
|
||||
else
|
||||
awakener_hold_frames = 0
|
||||
end
|
||||
if awakener_hold_frames == 90 then
|
||||
exit_dither = ditherer.new{di=1}
|
||||
awakener_armed = false
|
||||
end
|
||||
end
|
||||
if exit_dither and exit_dither:update() then
|
||||
exit_dither = nil
|
||||
awakener_hold_frames=0
|
||||
mainview = fast_awakener.new()
|
||||
end
|
||||
mainview:update()
|
||||
end
|
||||
|
||||
function _draw()
|
||||
mainview:draw()
|
||||
if awakener_hold_frames >= 30 then
|
||||
local gpx=(awakener_hold_frames-30) * 2 + 7
|
||||
rectfill(0,0,gpx,9,4)
|
||||
rectfill(gpx+1,0,128,9,5)
|
||||
font_default()
|
||||
print("keep holding for awakener", 1, 1, 7)
|
||||
font_special()
|
||||
end
|
||||
if exit_dither then
|
||||
exit_dither:draw()
|
||||
end
|
||||
end
|
||||
|
||||
function font_dogica()
|
||||
@ -270,23 +301,35 @@ function font_default()
|
||||
poke(0x5f58, 0x80)
|
||||
end
|
||||
|
||||
function font_special()
|
||||
poke(0x5f58, 0x81)
|
||||
end
|
||||
|
||||
-->8
|
||||
-- text rendering
|
||||
|
||||
-- text colors for zonk mode:
|
||||
-- 8 -- standard
|
||||
-- 9 -- delayed fade
|
||||
-- 10 -- currently fading in
|
||||
txtbox = {
|
||||
x=0,
|
||||
y=0,
|
||||
text="???",
|
||||
col=8,
|
||||
f=0,
|
||||
interval=4,
|
||||
mode=0x81,
|
||||
}
|
||||
mknew(txtbox)
|
||||
mknew(txtbox, function(self)
|
||||
if (not self.cols) self.cols = {14,10,9,8}
|
||||
self.c = deli(self.cols)
|
||||
end)
|
||||
|
||||
function txtbox:update() end
|
||||
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:draw()
|
||||
poke(0x5f58, self.mode)
|
||||
@ -305,6 +348,12 @@ spring = {
|
||||
}
|
||||
mknew(spring)
|
||||
|
||||
function easeoutovershoot(t)
|
||||
t-=1
|
||||
return 1+2.7*t*t*t+1.7*t*t
|
||||
end
|
||||
|
||||
|
||||
function spring:update()
|
||||
local v = self.v
|
||||
self.v:update()
|
||||
@ -313,7 +362,7 @@ function spring:update()
|
||||
return true
|
||||
end
|
||||
local t, range = self.f/self.frames, self.to - self.from
|
||||
v.y = self.to-range*(2^(-10*t)*cos(2*t))
|
||||
v.y = self.from + easeoutovershoot(t)*range
|
||||
self.f += 1
|
||||
end
|
||||
|
||||
@ -337,7 +386,7 @@ function scoot:update()
|
||||
return true
|
||||
end
|
||||
self.f += 1
|
||||
if self.f < 0 then
|
||||
if self.f <= 0 then
|
||||
v.y=self.from
|
||||
return
|
||||
end
|
||||
@ -351,7 +400,10 @@ end
|
||||
|
||||
scootbox = {}
|
||||
mknew(scootbox, function(x)
|
||||
x.v = view.new()
|
||||
x.v = view.new{
|
||||
x=x.x,
|
||||
y=x.from or scoot.from,
|
||||
}
|
||||
x.s = scoot.new{
|
||||
from=x.from or scoot.from,
|
||||
to=x.to or scoot.to,
|
||||
@ -380,6 +432,52 @@ 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 t1 = txtbox.new{
|
||||
x=x+1,
|
||||
y=y+1,
|
||||
interval=itv,
|
||||
cols=cparr(shd_txt_pal),
|
||||
mode=md,
|
||||
text=s,
|
||||
}
|
||||
local v = view.of{
|
||||
t1,
|
||||
txtbox.new{
|
||||
x=x,
|
||||
y=y,
|
||||
interval=itv,
|
||||
cols=cparr(p),
|
||||
mode=md,
|
||||
text=s,
|
||||
},
|
||||
}
|
||||
itv=spring.new{
|
||||
from=amt,
|
||||
frames=frms,
|
||||
v=v,
|
||||
}
|
||||
itv.eff_w=t1:xmax()
|
||||
return itv
|
||||
end
|
||||
|
||||
-->8
|
||||
-- zonk renderer
|
||||
|
||||
@ -396,7 +494,8 @@ mknew(ditherer, function(x)
|
||||
end)
|
||||
|
||||
function ditherer:update()
|
||||
self.i += self.di
|
||||
if (self.i > 0 and self.di < 0) self.i += self.di
|
||||
if (self.i < #self.pattern + 1 and self.di > 0) self.i += self.di
|
||||
return self.i < 0 or self.i >= #self.pattern + 1
|
||||
end
|
||||
|
||||
@ -417,8 +516,8 @@ mknew(fuzzy, function(x)
|
||||
local p = (x.p or fuzzy.p) & 0xffff
|
||||
x.mass = 0
|
||||
while p ~= 0 do
|
||||
x.mass += p & 0x8000
|
||||
p = p << 1
|
||||
x.mass += p & 1
|
||||
p = (p >>> 1) & 0xffff
|
||||
end
|
||||
end)
|
||||
|
||||
@ -427,7 +526,7 @@ function fuzzy:update()
|
||||
if (self.n < self.interval) return
|
||||
self.n = 0
|
||||
for i=1,self.tries do
|
||||
local b = 1 << rnd(15)
|
||||
local b = 1 << rnd(16)
|
||||
if b & self.p == 0 then
|
||||
if i == self.tries or not self.weight or self.mass <= self.weight then
|
||||
self.mass += 1
|
||||
@ -455,7 +554,7 @@ fuzzy_stripey = {
|
||||
weight = 12,
|
||||
spacing = 7,
|
||||
gap = 32,
|
||||
colors = {5, 2, 1},
|
||||
colors = split"3,5,2,1",
|
||||
}
|
||||
mknew(fuzzy_stripey, function(f)
|
||||
f.fuzz = fuzzy.new{
|
||||
@ -482,13 +581,443 @@ function fuzzy_stripey:draw()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--@musurca & @felice
|
||||
function cminskycirc(r,c)
|
||||
local j,k,rat=r,0,1/r
|
||||
poke(0x5f25,c) --set color
|
||||
for i=1,r*0.785 do
|
||||
k-=rat*j
|
||||
j+=rat*k
|
||||
pset(63.5+j,63.5+k)
|
||||
pset(63.5+j,63.5-k)
|
||||
pset(63.5-j,63.5+k)
|
||||
pset(63.5-j,63.5-k)
|
||||
pset(63.5+k,63.5+j)
|
||||
pset(63.5+k,63.5-j)
|
||||
pset(63.5-k,63.5+j)
|
||||
pset(63.5-k,63.5-j)
|
||||
end
|
||||
pset(63.5,63.5-r)
|
||||
pset(63.5,63.5+r)
|
||||
pset(63.5-r,63.5)
|
||||
pset(63.5+r,63.5)
|
||||
end
|
||||
|
||||
obvious_breather=split"2,3,4,3,2"
|
||||
bg_breather=split"1,2,3,2,1"
|
||||
breather = {
|
||||
colors = obvious_breather,
|
||||
sep = 8,
|
||||
speed=240,
|
||||
f=0,
|
||||
}
|
||||
mknew(breather)
|
||||
|
||||
function breather:update()
|
||||
if (self.freeze) return
|
||||
local f = self.f + 1
|
||||
if (not self.on) f = 0
|
||||
if (f >= self.speed) f = -self.speed
|
||||
if f == 0 or f == -self.speed then
|
||||
if self.nextspeed then
|
||||
self.speed = self.nextspeed
|
||||
self.nextspeed = nil
|
||||
end
|
||||
if self.off_soon then
|
||||
self.on = false
|
||||
f=0
|
||||
end
|
||||
if self.nextcolors then
|
||||
self.colors=self.nextcolors
|
||||
end
|
||||
end
|
||||
self.f = f
|
||||
end
|
||||
|
||||
function easeinout(t)
|
||||
if(t<.5) then
|
||||
return t*t*t*4
|
||||
else
|
||||
t-=1
|
||||
return 1-t*t*t*-4
|
||||
end
|
||||
end
|
||||
|
||||
function breather:draw()
|
||||
fillp(0)
|
||||
local cols, f, spd, sep = self.colors, self.f, self.speed, self.sep
|
||||
local stall = sep * (#cols - 1)
|
||||
local cap = spd-stall
|
||||
if (f >= 0) f += stall
|
||||
for i,c in ipairs(cols) do
|
||||
local ef = f - (i-1)*sep
|
||||
ef = abs(ef) - stall
|
||||
if ef <= cap and ef > 0 then
|
||||
cminskycirc(easeinout(ef/cap)<<6,c)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
function breather:starting_reverse()
|
||||
return self.f + self.speed < self.sep * #self.colors
|
||||
end
|
||||
|
||||
function breather:starting_forward()
|
||||
return self.f > 0 and self.f < 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,0,0,0,0,128,129,133,141,13,6,15,7"
|
||||
def_15_fade = split"0,0,128,129,133,141,13,13,6,6,15,15,7"
|
||||
def_13_fade = split"0,0,0,0,0,128,129,133,141,140,140,13,12"
|
||||
def_shd_fade = split"0,0,0,128,130,141,2"
|
||||
|
||||
-- frames per character to wait
|
||||
-- during zonk text display.
|
||||
fchr=2
|
||||
|
||||
zonk_mode = {
|
||||
files={},
|
||||
lnh = 9,
|
||||
--space width
|
||||
spc_w = 2,
|
||||
--text mode
|
||||
txmd=0x81,
|
||||
--text spring-in distance
|
||||
txd=10,
|
||||
--text spring-in frames
|
||||
txf=20,
|
||||
--exit frames
|
||||
exf=60,
|
||||
--exit magnitude
|
||||
exmg=16,
|
||||
--character wait multiplier
|
||||
cmul=1,
|
||||
p=def_z_pal,
|
||||
fd13 = def_13_fade,
|
||||
fd14 = def_14_fade,
|
||||
fd15 = def_15_fade,
|
||||
fd12 = def_shd_fade,
|
||||
|
||||
twt=60,
|
||||
expect_cfg_line=true,
|
||||
txt_frame=blank,
|
||||
playing_text=true,
|
||||
cx=0,
|
||||
cy=0,
|
||||
}
|
||||
mknew(zonk_mode, function(self)
|
||||
self.stripes=fuzzy_stripey.new{}
|
||||
self.brth=breather.new{}
|
||||
end)
|
||||
|
||||
function zonk_mode:set(_, field,value)
|
||||
pukeboard{field=field, value=value}
|
||||
self[field]=value
|
||||
end
|
||||
function zonk_mode:g(_, fn, ...)
|
||||
return _ENV[fn](...)
|
||||
end
|
||||
function zonk_mode:at(_, x, y)
|
||||
self.txt_frame=scootbox.new{
|
||||
x=x,
|
||||
from=y,
|
||||
to=y-self.exmg,
|
||||
frames=self.exf,
|
||||
}
|
||||
end
|
||||
function zonk_mode:bon()
|
||||
self.brth.on=true
|
||||
self.brth.off_soon=false
|
||||
end
|
||||
function zonk_mode:boff()
|
||||
self.brth.off_soon=true
|
||||
end
|
||||
function zonk_mode:bspd(_, spd)
|
||||
self.brth.nextspeed=spd
|
||||
end
|
||||
function zonk_mode:bpal(_, p)
|
||||
self.brth.nextcolors= p == 1 and obvious_breather or bg_breather
|
||||
end
|
||||
function zonk_mode:activate()
|
||||
clear_alt_pal_bits()
|
||||
pal()
|
||||
font_dogica()
|
||||
if (type(self.file) == "string") self.file = split(self.file, "\n")
|
||||
if (not self.file) self:next_file()
|
||||
assert(self.file)
|
||||
end
|
||||
function zonk_mode:next_file()
|
||||
if #self.files > 0 then
|
||||
self.file=split(deli(self.files,1), "\n")
|
||||
self.expect_cfg_line=true
|
||||
end
|
||||
end
|
||||
|
||||
-- return char count, item
|
||||
-- or 0, nil: end of page
|
||||
-- or nil (, nil): end of file
|
||||
function zonk_mode:next_item()
|
||||
if not self.line then
|
||||
if (not self.file or #self.file == 0) return
|
||||
if self.expect_cfg_line then
|
||||
self.expect_cfg_line = false
|
||||
local cfg_line = deli(self.file, 1)
|
||||
for i,cmd in ipairs(split(cfg_line, " ")) do
|
||||
if #cmd > 0 then
|
||||
local frags = split(cmd,":")
|
||||
assert(type(self[frags[1]])=="function", tostr(i).." - "..cfg_line)
|
||||
self[frags[1]](self, unpack(frags))
|
||||
end
|
||||
end
|
||||
return self:next_item()
|
||||
end
|
||||
local line = deli(self.file, 1)
|
||||
if line == "-----" then
|
||||
self.line = nil
|
||||
self.expect_cfg_line = true
|
||||
self.cx = 0
|
||||
self.cy = 0
|
||||
return 0, nil
|
||||
end
|
||||
self.line = split(line, " ")
|
||||
end
|
||||
if #self.line==0 then
|
||||
self.line = nil
|
||||
self.cx = 0
|
||||
self.cy += self.lnh
|
||||
return self:next_item()
|
||||
end
|
||||
-- parse token
|
||||
local token = tostr(del(self.line, 1))
|
||||
while #token == 0 and #self.line > 0 do
|
||||
-- emit extra spaces
|
||||
self.cx += 1 + self.spc_w
|
||||
token = tostr(deli(self.line, 1))
|
||||
end
|
||||
local pp,cmult=nrm_txt_pal,1
|
||||
if (token[1]=="$") token,cmult=sub(token,2),2
|
||||
if (token[1]=="^") token,cmult=sub(token,2),0.5
|
||||
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_w
|
||||
return #token,ret
|
||||
end
|
||||
|
||||
function zonk_mode:empty()
|
||||
if (self.file and #self.file > 0) return false
|
||||
return #self.files == 0
|
||||
end
|
||||
|
||||
function fadetbl(col, tbl, frac)
|
||||
pal(col,tbl[1+(frac*#tbl)&0x7fff],1)
|
||||
end
|
||||
|
||||
function zonk_mode:update()
|
||||
if self.playing_text then
|
||||
self.twt -= 1
|
||||
if self.twt <= 0 then
|
||||
local cn,item = self:next_item()
|
||||
if not cn then
|
||||
self:next_file()
|
||||
self.playing_text=false
|
||||
elseif cn < 0 then
|
||||
self.twt = -cn
|
||||
else
|
||||
self.twt = cn*fchr*self.cmul
|
||||
end
|
||||
if item then
|
||||
self.txt_frame:push(item)
|
||||
else
|
||||
self.playing_text=false
|
||||
end
|
||||
end
|
||||
else
|
||||
--waiting to advance or exit
|
||||
if self.wtmr then
|
||||
self.twt += self.wait_more
|
||||
self.wtmr = nil
|
||||
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) then
|
||||
self.nextpage = true
|
||||
self.txt_frame.go = true
|
||||
self.fpfrm = self.exf
|
||||
end
|
||||
else
|
||||
self.twt -= 1
|
||||
end
|
||||
end
|
||||
if self.nextpage and not self.d then
|
||||
if self.fpfrm > 0 then
|
||||
self.fpfrm -= 1
|
||||
elseif self:empty() then
|
||||
self.txt_frame=blank
|
||||
self.d = ditherer.new{di=0.5}
|
||||
else
|
||||
self.nextpage = false
|
||||
self.confirmed=false
|
||||
self.txt_frame=blank
|
||||
self.playing_text=true
|
||||
self.fpfrm=nil
|
||||
end
|
||||
end
|
||||
self.stripes:update()
|
||||
self.brth:update()
|
||||
self.txt_frame:update()
|
||||
if (self.d and self.d:update()) seq:next()
|
||||
end
|
||||
|
||||
function zonk_mode:draw()
|
||||
cls(0)
|
||||
pal(self.p, 1)
|
||||
self.stripes:draw()
|
||||
self.brth:draw()
|
||||
if self.fpfrm then
|
||||
local ffrac = self.fpfrm/self.exf
|
||||
fadetbl(12, self.fd12, ffrac)
|
||||
fadetbl(13, self.fd13, ffrac)
|
||||
fadetbl(14, self.fd14, ffrac)
|
||||
fadetbl(15, self.fd15, ffrac)
|
||||
end
|
||||
self.txt_frame:draw()
|
||||
-- TODO: draw throbber
|
||||
if not self.playing_text and not self.confirmed and self.twt <= 0 then
|
||||
print("➡️",121,121,12)
|
||||
print("➡️",120,120,self:throbber_color())
|
||||
end
|
||||
if(self.d) self.d:draw()
|
||||
end
|
||||
|
||||
function zonk_mode:throbber_color()
|
||||
if (not self.bwt) return ((t()<<1)&0x1 < 1) and 7 or 6
|
||||
return self.brth:matches(self.bwt) and 7 or 6
|
||||
end
|
||||
|
||||
-->8
|
||||
-- awakener
|
||||
|
||||
fast_awakener = {}
|
||||
mknew(fast_awakener)
|
||||
|
||||
function fast_awakener:update()
|
||||
--todo: implement
|
||||
end
|
||||
|
||||
function fast_awakener:draw()
|
||||
cls()
|
||||
pal()
|
||||
clear_alt_pal_bits()
|
||||
font_default()
|
||||
print("placeholder", 45, 61, 8)
|
||||
end
|
||||
|
||||
-->8
|
||||
-- consent screens
|
||||
|
||||
ao_splash = {
|
||||
fwait = 180,
|
||||
}
|
||||
mknew(ao_splash, function(self)
|
||||
self.c = breather.new{
|
||||
colors={7,15,14,8,2},
|
||||
sep=3,
|
||||
f=15,
|
||||
on=true,
|
||||
}
|
||||
font_dogica()
|
||||
end)
|
||||
|
||||
function ao_splash:update()
|
||||
if self.c.f < self.c.speed/2.5 then
|
||||
self.c:update()
|
||||
return
|
||||
end
|
||||
self.fwait -= 1
|
||||
if (self.fwait < ao_splash.fwait-30 and (btnp() & 0xf > 0) and self.fwait > 0) self.fwait = 0
|
||||
if self.fwait == 0 then
|
||||
self.d = ditherer.new{di=1}
|
||||
end
|
||||
if (self.d) self.d:update()
|
||||
if self.fwait <= -32 then
|
||||
-- TODO: consent screen
|
||||
mainview=consent_splash.new()
|
||||
mainview:update()
|
||||
end
|
||||
end
|
||||
|
||||
function ao_splash:draw()
|
||||
cls()
|
||||
self.c:draw()
|
||||
if self.fwait < ao_splash.fwait then
|
||||
print("18+", 55, 60, 7)
|
||||
print("aDULTS ONLY", 35, 90, 15)
|
||||
end
|
||||
if (self.d) self.d:draw()
|
||||
end
|
||||
|
||||
consent_splash = {
|
||||
f = 0,
|
||||
}
|
||||
mknew(consent_splash, function(self)
|
||||
self.d = ditherer.new{
|
||||
di=-1
|
||||
}
|
||||
awakener_armed = true
|
||||
awakener_hold_frames = 0
|
||||
end)
|
||||
|
||||
function consent_splash:update()
|
||||
if (self.f < 0x7fff) self.f += 1
|
||||
if (btnp(1) and self.f > 150) self.d.di = 1
|
||||
if self.d:update() and self.d.di > 0 then
|
||||
mainview=newtitle()
|
||||
mainview:update()
|
||||
end
|
||||
end
|
||||
|
||||
function consent_splash:draw()
|
||||
cls()
|
||||
font_special()
|
||||
print("\^w\^twarning", 20, 2, 10)
|
||||
font_default()
|
||||
cursor(1, 25)
|
||||
color(6)
|
||||
print("this game will \fchypnotize\f6 you.")
|
||||
if (self.f < 45) return
|
||||
print("")
|
||||
print("hypnotic suggstions include:")
|
||||
print("relaxation, trance, obedience,")
|
||||
print("loss of volition, euphoria, joy,")
|
||||
print("amnesia, identity loss, and the")
|
||||
print("experience of \fetranformation")
|
||||
print("into a pooltoy orca.\f6")
|
||||
if (self.f < 90) return
|
||||
print("")
|
||||
print("an awakener that removes all")
|
||||
print("suggestions is available at")
|
||||
print("\faany time:\f6 hold ❎ or 🅾️.")
|
||||
print("gameplay uses only arrows.")
|
||||
if(self.f < 300) return
|
||||
print("")
|
||||
print("")
|
||||
print(" consent and begin: \f7➡️")
|
||||
self.d:draw()
|
||||
end
|
||||
|
||||
-->8
|
||||
-- title screen
|
||||
|
||||
@ -513,7 +1042,7 @@ end
|
||||
|
||||
function title_screen:draw()
|
||||
pal()
|
||||
memset(0x5f78,0x0,8)
|
||||
clear_alt_pal_bits()
|
||||
cls(12)
|
||||
print("title screen", 30, 57, 0)
|
||||
print("press right arrow", 15, 66, 0)
|
||||
@ -521,8 +1050,8 @@ function title_screen:draw()
|
||||
end
|
||||
|
||||
function title_screen:update()
|
||||
self.d:update()
|
||||
if (btnp(1)) start_game()
|
||||
if (btnp(1)) self.d.di = 1
|
||||
if(self.d:update() and self.d.di > 0) start_game()
|
||||
end
|
||||
-->8
|
||||
-- dolphin sprite renderer
|
||||
@ -720,7 +1249,8 @@ 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 word target
|
||||
-->8
|
||||
-- arcade mode
|
||||
|
||||
wordtarget = {
|
||||
x = 129,
|
||||
@ -757,9 +1287,6 @@ 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)
|
||||
@ -818,6 +1345,10 @@ function wave(toff)
|
||||
return 2.5 * sin((t()+toff)>>1)
|
||||
end
|
||||
|
||||
function clear_alt_pal_bits()
|
||||
memset(0x5f70,0x0,16)
|
||||
end
|
||||
|
||||
sea = {}
|
||||
mknew(sea)
|
||||
|
||||
@ -1008,22 +1539,53 @@ function sequencer:next()
|
||||
else
|
||||
mainview = rec.f()
|
||||
end
|
||||
if(mainview.activate) mainview:activate()
|
||||
mainview:update()
|
||||
end
|
||||
|
||||
function start_game()
|
||||
seq = sequencer.new{
|
||||
{
|
||||
f=zonk_mode.new,
|
||||
params={{
|
||||
file=[[at:2:55
|
||||
hI! iN A LATER VERSION
|
||||
THERE WILL BE ACTUAL
|
||||
INSTRUCTIONS HERE AND
|
||||
THE BG WON'T BE ON.]],
|
||||
txd=0,
|
||||
txf=1,
|
||||
cmul=0.25,
|
||||
}},
|
||||
},
|
||||
{
|
||||
f = arcade_level.new,
|
||||
params = {{
|
||||
max_score=2,
|
||||
max_score=5,
|
||||
}}
|
||||
},
|
||||
{
|
||||
f = function()
|
||||
pal()
|
||||
return view.of{bg.new(), fuzzy_stripey.new{interval=7}}
|
||||
end,
|
||||
f = zonk_mode.new,
|
||||
params={{
|
||||
file=[[at:40:40
|
||||
ZONK TEXT TEST
|
||||
#ZONK TEXT #TEST
|
||||
$ZONK $TEXT $TEST
|
||||
!ZONK !TEXT !TEST
|
||||
^ZONK ^TEXT ^TEST
|
||||
-----
|
||||
at:30:60 bon bpal:1 set:confirmed:true set:bwt:1 set:txf:2 set:txd:0 set:exd:0 set:exf:10
|
||||
bREATHE IN...
|
||||
-----
|
||||
at:28:60 set:confirmed:true set:bwt:2 bpal:2
|
||||
bREATHE OUT...
|
||||
-----
|
||||
set:bwt:0 set:txd:16 set:txf:20 set:exf:60 at:1:55
|
||||
gREAT! iT'S LIKE YOU'VE
|
||||
BEEN DOING THIS YOUR
|
||||
ENTIRE LIFE.
|
||||
]],
|
||||
}},
|
||||
},
|
||||
}
|
||||
seq:next()
|
||||
@ -1249,22 +1811,22 @@ h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000h000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
__map__
|
||||
0608090000010000000000000000000045102051550075740000000000541606020000006006260000070710705750100500010070072700000000200070740100006066600060600060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000101010101000100000a0a050000000000123f12123f1200000e15050e14150e2215150a285454220609090629112e000002020100000000020101010101020001020202020201000004150a150400000004041f040400000000000000020201000000000f00000000000000000001000808040402020101
|
||||
0e11151515110e000407040404041f000e11100804021f000f10100e10100f00080c0a091f0808001f010f1010110e000e11010f11110e001f111008040202000e11110e11110e000e11111e1008060000000100000100000000000200020201000402010204000000003f003f00000000010204020100000e11100c02000400
|
||||
1e212d291d413e00000e101e11111e0001010f1111110f00000e110101011e0010101e1111111e00000e111f01011e001c02020f02020200001e1111111e100e01010d131111110002000302020207000007020202020201001109050709110000010101010106000036494949494900000c131111111100000e111111110e00
|
||||
000f1111110f0101001e1111111e1010000d030101010100000e010e10110e0001010f0101010e000011111111191600001111110a0a04000020252525251a0000110a04040a11000000090909060403000f080402010f00030101010101030001010202040408080302020202020300040a110000000000000000000000003f
|
||||
00010202000000000e1111111f1111000f11110f11110f000e11010101110e001f22222222221e001f01010f01011f001f01010f010101001e01011911111e001111111f1111110007020202020207000f0404040404030011090507090911000101010101010f002121332d2121210011131519111111000e11111111110e00
|
||||
0f11110f010101000e111111150916000f11110f091111000e11010e10110e001f040404040404001111111111110e00111111110a0a0400414149494955220011110a040a1111001111110a040404001f10080402011f00040a020101020a040101010101010101020504080804050200000026190000000000000000000000
|
||||
00007f7f7f7f7f000000552a552a55000000417f5d5d3e0000003e6363773e0000001144114411000000021e0e0f080000000e171f1f0e0000001b1f1f0e040000001c3677361c0000000e0e1f0e0a0000001c3e7f2a3a0000003e6763673e0000007f5d7f417f0000001c040407070000003e636b633e000000040e1f0e0400
|
||||
000000005500000000003e7363733e000000081c7f3e220000001f0e040e1f0000003e7763633e000000000552200000000000112a44000000003e6b776b3e0000007f007f007f000000555555555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
0707070707000000000707070000000000070507000000000005020500000000000500050000000000050505000000000406070604000000010307030100000007010101000000000004040407000000050702070200000000000200000000000000000102000000000000030300000005050000000000000205020000000000
|
||||
0000000000000000181818180000180066666600000000006666ff66ff666600187c063c603e1800466630180c6662003c663c1ce666fc00181818000000000030180c0c0c1830000c18303030180c0000663cff3c6600000018187e18180000000000000018180c0000007e00000000000000000018180000c06030180c0600
|
||||
3c66766e66663c0018181c1818187e003c6660300c067e003c66603860663c0060707866fe6060007e063e6060663c003c66063e66663c007e663018181818003c66663c66663c003c66667c60663c000000180000180000000018000018180c70180c060c18700000007e007e0000000e18306030180e003c66603018001800
|
||||
3c66767606463c0000003c607c667c000006063e66663e0000003c0606063c000060607c66667c0000003c667e063c000070187c1818180000007c66667c603e0006063e666666000018001c18183c00006000606060603c000606361e366600001c181818183c00000066fefed6c60000003e666666660000003c6666663c00
|
||||
00003e66663e060600007c66667c606000003e660606060000007c063c603e0000187e18181870000000666666667c0000006666663c18000000c6d6fe7c6c000000663c183c660000006666667c301e00007e30180c7e003c0c0c0c0c0c3c0000060c183060c0003c30303030303c00183c6600000000000000000000007e00
|
||||
0c18300000000000183c667e666666003e66663e66663e003c66060606663c001e36666666361e007e06061e06067e007e06061e060606003c66067666663c006666667e666666003c18181818183c007830303030361c0066361e0e1e3666000606060606067e00c6eefed6c6c6c600666e7e7e766666003c66666666663c00
|
||||
3e66663e060606003c666666663c70003e66663e1e3666003c66063c60663c007e181818181818006666666666663c0066666666663c1800c6c6c6d6feeec60066663c183c6666006666663c181818007e6030180c067e00380c0c060c0c380000181818181818001c30306030301c0030180c0000000000001c36361c000000
|
||||
7f7f7f7f7f000000552a552a55000000417f5d5d3e0000003e6363773e0000001144114411000000043c1c1e100000001c2e3e3e1c000000363e3e1c080000001c3677361c0000001c1c3e1c140000001c3e7f2a3a0000003e6763673e0000007f5d7f417f0000003808080e0e0000003e636b633e000000081c3e1c08000000
|
||||
00005500000000003e7363733e000000081c7f3e220000003e1c081c3e0000003e7763633e000000000552200000000000112a44000000003e6b776b3e0000007f007f007f00000055555555550000000e041e2d2600000011212125020000000c1e20201c000000081e08241a0000004e043e4526000000225f12120a000000
|
||||
1e083c1106000000100c020c10000000227a2222120000001e2000023c000000083c10020c000000020202221c000000083e080c08000000123f12021c0000003c107e043800000002073202320000000f020e101c0000003e404020180000003e10080810000000083804023c00000032071278180000007a42020a72000000
|
||||
093e4b6d660000001a272273320000003c4a494946000000123a123a1a000000236222221c0000000c00082a4d000000000c1221400000007d79113d5d0000003e3c081e2e00000006247e2610000000244e04463c0000000a3c5a46300000001e041e4438000000143e2408080000003a56523008000000041c041e06000000
|
||||
08023e201c00000022222620180000003e1824723000000004362c26640000003e182442300000001a272223120000000e641c28780000000402062b1900000000000e1008000000000a1f120400000000040f150d00000000040c060e0000003e2014040200000030080e0808000000083e2220180000003e0808083e000000
|
||||
107e181412000000043e242232000000083e083e080000003c24221008000000047c1210080000003e2020203e000000247e242010000000062026100c0000003e20101826000000043e240438000000222420100c0000003e222d300c0000001c083e08040000002a2a20100c0000001c003e080400000004041c2404000000
|
||||
083e080804000000001c00003e0000003e2028102c000000083e305e08000000202020100e0000001024244442000000021e02021c0000003e2020100c0000000c12214000000000083e082a2a0000003e201408100000003c003e001e000000080424427e00000040281068060000001e041e043c000000043e240404000000
|
||||
1c1010103e0000001e101e101e0000003e003e201800000024242420100000001414145432000000020222120e0000003e2222223e0000003e2220100c0000003e203c2018000000062020100e000000001510080600000000041e140400000000000c081e000000001c18101c00000008046310080000000810630408000000
|
||||
04050700000100000000000000607700672000617700060600000000006677070100000060072700000010200070700000000110600020111000102100000671333313111333121333103333117766007600f1758f17677f7788767086182273ff8fff01ffffedff81ff8f7f8188f800ff8fff01ffffeeff88888808818888f0
|
||||
0007070707070000000007070700000000000705070000000000050205000000000005000500000000000505050000000004060706040000000103070301000000070101010000000000040404070000000507020702000000000001000000000000000001020000000000000303000000050500000000000002050200000000
|
||||
000000000000000000010101000100000005050000000000000a1f0a1f0a0000000207030607020000050402010500000002050e050e0000000101000000000000020101010200000001020202010000000502070205000000000207020000000000000000010100000000070000000000000000000100000004040201010000
|
||||
|
Reference in New Issue
Block a user