From 23d18688017693efe20f4c30a3c932564ecbe386 Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Sat, 8 Feb 2020 00:56:44 -0500 Subject: [PATCH] Update wpath.lua --- wpath.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wpath.lua b/wpath.lua index fb41093..48d7492 100644 --- a/wpath.lua +++ b/wpath.lua @@ -8,6 +8,7 @@ wpath.bwcols = "087f78" wpath.waveLen = 3 wpath.textScale = 2.5 wpath.delay = 0.05 +wpath.doFlip = false local rbow,bbow local sizePath = "size.lua" @@ -50,12 +51,18 @@ local render = function(shift,mon) local scr_x,scr_y = mon.getSize() scr_y = scr_y + (scr_y % 2) bow = mon.isColor() and rbow or bbow + local txcol, bgcol for y = 1, scr_y do mon.setCursorPos(1,y) line = bow:rep(scr_x):sub(1,scr_x) local text = ("#"):rep(scr_x) - local txcol = wrap(line, -1*math.abs(y-scr_y/2)+shift-1) - local bgcol = wrap(line, -1*math.abs(y-scr_y/2)+shift) + if wpath.doFlip then + txcol = wrap(line, -1*math.abs(scr_y/2-y)+shift-1) + bgcol = wrap(line, -1*math.abs(scr_y/2-y)+shift) + else + txcol = wrap(line, -1*math.abs(y-scr_y/2)+shift-1) + bgcol = wrap(line, -1*math.abs(y-scr_y/2)+shift) + end mon.blit(text,txcol,bgcol) end end