trim comments, shorten things that compress badly

This commit is contained in:
Kistaro Windrider 2024-02-11 23:19:18 -08:00
parent 7a2b0f022b
commit 356ef82817
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -99,9 +99,6 @@ function event_list:draw()
end end
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) function outer_or_each_opt(t, mname)
local fun = t[mname] local fun = t[mname]
if fun then if fun then
@ -120,12 +117,6 @@ blank = {}
function blank:update() end function blank:update() end
function blank:draw() 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) function puke(item, indent, seen, hidekey)
if (type(item) ~= "table") return tostr(item) if (type(item) ~= "table") return tostr(item)
@ -207,8 +198,6 @@ end
function _init() function _init()
-- disable btnp repeat -- disable btnp repeat
-- TODO: set back to 30 frames
-- outside of game mode
poke(0x5f5c, 255) poke(0x5f5c, 255)
-- complex fill API mode -- complex fill API mode
@ -257,9 +246,9 @@ end
function _draw() function _draw()
mainview:draw() mainview:draw()
if awakener_hold_frames >= 30 then if awakener_hold_frames >= 30 then
local gpx=(awakener_hold_frames-30) * 2 + 7 local x=(awakener_hold_frames-30) * 2 + 7
rectfill(0,0,gpx,9,4) rectfill(0,0,x,9,4)
rectfill(gpx+1,0,128,9,5) rectfill(x+1,0,128,9,5)
font_default() font_default()
print("keep holding for awakener", 1, 1, 7) print("keep holding for awakener", 1, 1, 7)
end end
@ -588,10 +577,10 @@ function cminskycirc(r,c)
pset(63.5+r,63.5) pset(63.5+r,63.5)
end end
obvious_breather=split"2,3,4,3,2" brth_fg={2,3,4,3,2}
bg_breather=split"1,2,3,2,1" brth_bg={1,2,3,2,1}
breather = { breather = {
colors = obvious_breather, colors = brth_fg,
sep = 8, sep = 8,
speed=240, speed=240,
f=0, f=0,
@ -742,7 +731,7 @@ function zonk_mode:bspd(_, spd)
self.brth.nextspeed=spd self.brth.nextspeed=spd
end end
function zonk_mode:bpal(_, p) 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 end
function zonk_mode:bgdy(_, dy) function zonk_mode:bgdy(_, dy)
self.stripes.dy = dy self.stripes.dy = dy
@ -971,7 +960,7 @@ wide awake!
function normal_awakener() function normal_awakener()
return zonk_mode.new{ return zonk_mode.new{
br_spd=300, br_spd=300,
br_cols=bg_breather, br_cols=brth_bg,
file=[[center:2:15 bon file=[[center:2:15 bon
yOU'VE LEARNED yOU'VE LEARNED
SO WELL! SO WELL!
@ -1010,7 +999,7 @@ function fast_awakener()
} }
return zonk_mode.new{ return zonk_mode.new{
br_speed=240, br_speed=240,
br_cols=bg_breather, br_cols=brth_bg,
bg_dy=-0.12, bg_dy=-0.12,
p={ p={
[0]=0,128,133,5,4,5,6,7,133,134,6,140,132,12,7,7 [0]=0,128,133,5,4,5,6,7,133,134,6,140,132,12,7,7