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
This commit is contained in:
parent
db7ce90182
commit
873722b1ac
45
vacation.p8
45
vacation.p8
@ -244,15 +244,43 @@ function _init()
|
|||||||
-- complex fill API mode
|
-- complex fill API mode
|
||||||
poke(0x5f34, 1)
|
poke(0x5f34, 1)
|
||||||
|
|
||||||
|
awakener_hold_frames = 0
|
||||||
mainview = ao_splash.new()
|
mainview = ao_splash.new()
|
||||||
end
|
end
|
||||||
|
|
||||||
function _update60()
|
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()
|
mainview:update()
|
||||||
end
|
end
|
||||||
|
|
||||||
function _draw()
|
function _draw()
|
||||||
mainview: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
|
end
|
||||||
|
|
||||||
function font_dogica()
|
function font_dogica()
|
||||||
@ -560,6 +588,20 @@ end
|
|||||||
-->8
|
-->8
|
||||||
-- awakener
|
-- 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
|
-->8
|
||||||
-- consent screens
|
-- consent screens
|
||||||
@ -612,6 +654,8 @@ mknew(consent_splash, function(self)
|
|||||||
self.d = ditherer.new{
|
self.d = ditherer.new{
|
||||||
di=-1
|
di=-1
|
||||||
}
|
}
|
||||||
|
awakener_armed = true
|
||||||
|
awakener_hold_frames = 0
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function consent_splash:update()
|
function consent_splash:update()
|
||||||
@ -624,6 +668,7 @@ function consent_splash:update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function consent_splash:draw()
|
function consent_splash:draw()
|
||||||
|
cls()
|
||||||
font_special()
|
font_special()
|
||||||
print("\^w\^twarning", 20, 2, 10)
|
print("\^w\^twarning", 20, 2, 10)
|
||||||
font_default()
|
font_default()
|
||||||
|
Loading…
Reference in New Issue
Block a user