Update wpath.lua

This commit is contained in:
LDDestroier 2020-02-08 00:56:44 -05:00 committed by GitHub
parent cad7132e5b
commit 23d1868801
1 changed files with 9 additions and 2 deletions

View File

@ -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