From 356ef828178b40e51b9a3d36f5fe5841bec23b25 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 11 Feb 2024 23:19:18 -0800 Subject: [PATCH] trim comments, shorten things that compress badly --- vacation.p8 | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/vacation.p8 b/vacation.p8 index d0c7874..0017f2c 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -99,9 +99,6 @@ function event_list:draw() end end --- if t[mname] is a thing, --- invoke it as a method. else, --- try each object in t function outer_or_each_opt(t, mname) local fun = t[mname] if fun then @@ -120,12 +117,6 @@ blank = {} function blank:update() end function blank:draw() end --- puke emits a verbose string --- describing item, indented to --- the specified depth (0 by --- default). used for table --- debugging. table-type keys --- are not legible here function puke(item, indent, seen, hidekey) if (type(item) ~= "table") return tostr(item) @@ -207,8 +198,6 @@ end function _init() -- disable btnp repeat - -- TODO: set back to 30 frames - -- outside of game mode poke(0x5f5c, 255) -- complex fill API mode @@ -257,9 +246,9 @@ 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) + local x=(awakener_hold_frames-30) * 2 + 7 + rectfill(0,0,x,9,4) + rectfill(x+1,0,128,9,5) font_default() print("keep holding for awakener", 1, 1, 7) end @@ -588,10 +577,10 @@ function cminskycirc(r,c) pset(63.5+r,63.5) end -obvious_breather=split"2,3,4,3,2" -bg_breather=split"1,2,3,2,1" +brth_fg={2,3,4,3,2} +brth_bg={1,2,3,2,1} breather = { - colors = obvious_breather, + colors = brth_fg, sep = 8, speed=240, f=0, @@ -742,7 +731,7 @@ 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 + self.brth.nextcolors= p == 1 and brth_fg or brth_bg end function zonk_mode:bgdy(_, dy) self.stripes.dy = dy @@ -971,7 +960,7 @@ wide awake! function normal_awakener() return zonk_mode.new{ br_spd=300, - br_cols=bg_breather, + br_cols=brth_bg, file=[[center:2:15 bon yOU'VE LEARNED SO WELL! @@ -1010,7 +999,7 @@ function fast_awakener() } return zonk_mode.new{ br_speed=240, - br_cols=bg_breather, + br_cols=brth_bg, bg_dy=-0.12, p={ [0]=0,128,133,5,4,5,6,7,133,134,6,140,132,12,7,7