"adults only" splash

This commit is contained in:
Kistaro Windrider 2024-02-09 21:11:11 -08:00
parent ff60db72ad
commit 033a71d767
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -244,8 +244,7 @@ function _init()
-- complex fill API mode
poke(0x5f34, 1)
font_dogica()
mainview = newtitle()
mainview = ao_splash.new()
end
function _update60()
@ -514,6 +513,7 @@ breather = {
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
@ -559,6 +559,46 @@ 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-60 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=newtitle()
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
-->8
-- title screen