diff --git a/vacation.p8 b/vacation.p8 index a849c5e..7020f1d 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -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() @@ -560,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 @@ -612,6 +654,8 @@ mknew(consent_splash, function(self) self.d = ditherer.new{ di=-1 } + awakener_armed = true + awakener_hold_frames = 0 end) function consent_splash:update() @@ -624,6 +668,7 @@ function consent_splash:update() end function consent_splash:draw() + cls() font_special() print("\^w\^twarning", 20, 2, 10) font_default()