Compare commits

..

2 Commits

Author SHA1 Message Date
873722b1ac
implement emergency exit hook
awakener itself is not implemented but the code to get there is there.
the awakener itself needs the entire text zonk engine first
2024-02-09 23:06:28 -08:00
db7ce90182
consent screen prototype 2024-02-09 22:44:07 -08:00

View File

@ -244,15 +244,43 @@ function _init()
-- complex fill API mode
poke(0x5f34, 1)
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()
@ -269,6 +297,10 @@ function font_default()
poke(0x5f58, 0x80)
end
function font_special()
poke(0x5f58, 0x81)
end
-->8
-- text rendering
@ -556,6 +588,20 @@ 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
@ -586,7 +632,7 @@ function ao_splash:update()
if (self.d) self.d:update()
if self.fwait <= -32 then
-- TODO: consent screen
mainview=newtitle()
mainview=consent_splash.new()
mainview:update()
end
end
@ -600,6 +646,56 @@ function ao_splash:draw()
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