Новый скринсейвер, спизженный у кого-то с КК.ру

This commit is contained in:
Igor Timofeev 2017-01-11 14:54:59 +03:00
parent 631670b5ad
commit 17f22cef09
5 changed files with 73 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -495,8 +495,15 @@
version=1.00,
},
{
name="MineOS/System/OS/Screensavers/Kaleidoscope.lua",
url="IgorTimofeev/OpenComputers/master/MineOS/Screensavers/Kaleidoscope.lua",
name="MineOS/System/OS/Screensavers/Mandala.lua",
url="IgorTimofeev/OpenComputers/master/MineOS/Screensavers/Mandala.lua",
type="Script",
forceDownload=true,
version=1.00,
},
{
name="MineOS/System/OS/Screensavers/Clock.lua",
url="IgorTimofeev/OpenComputers/master/MineOS/Screensavers/Clock.lua",
type="Script",
forceDownload=true,
version=1.00,

BIN
MineOS/.DS_Store vendored

Binary file not shown.

View File

@ -0,0 +1,64 @@
local gpu = require("component").gpu
local w, h, t, q = gpu.getResolution()
local numb, ha, wh, p, s, u, e, gsB, gS, ti, r, slp, tn = {29850,29351,30887,18925,14735,27343,9383,31407,31147,[0]=31599}, h/2-2, {0, 8, nil, 18, 26}, "", " ", h%2, w/2, gpu.setBackground, gpu.set, table.insert, math.random, os.sleep, tonumber
local function drawN(x, y, n)
local c = 0
for i = 0, 14 do
if bit32.extract(numb[n], i) == 1 then
gsB(60928)
gS(x, y, s)
else
gsB(0)
gS(x, y, s)
end
c, x = c + 1, x + 2
if c % 3 == 0 then
y, x = y + 1, x - 6
end
end
end
gsB(0)
gpu.fill(1, 1, w, h, " ")
local tbl = {x = {}, y = {}}
for x = 1, w, 2 do
for y = 1, ha-1-u do
ti(tbl.x, x)
ti(tbl.y, y)
end
end
for n = 1, #tbl.x do
k = r(n)
tbl.x[n], tbl.x[k], tbl.y[n], tbl.y[k] =
tbl.x[k], tbl.x[n], tbl.y[k], tbl.y[n]
end
while true do
q = 1
for i = 1, #tbl.x do
gpu.setForeground(r(tbl.x[i]*tbl.y[i])*512)
gS(tbl.x[i], tbl.y[i], p)
gS(-tbl.x[i]+w, -tbl.y[i]+h+1, p)
q = q + 1
if q == 55 then
t = os.date("%T")
for o = 1, 5 do
if o ~= 3 then
drawN(e+wh[o]-15, ha+u, tn(t:sub(o,o)))
end
end
if tn(t:sub(5, 5))%2 == 0 then
gsB(60928)
else
gsB(0)
end
gS(e, ha+1+u, s)
gS(e, ha+3+u, s)
gsB(0)
q = 1
slp(0.05)
end
slp()
end
slp(0.05)
end