Description
function _init()
cls()
spr(0,0,0,16,16)
points={}
for i=0,127 do
for j=0,127 do
if i%2==0 and j%2==0 and pget(i,j)~=0 then
add(points,{x=i,y=j,col=pget(i,j)})
end
end
end
cls()
srand(18)
xoff=rnd()
yoff=rnd()
zoff=rnd()
xam=rnd(1.9)+0.1
yam=rnd(1.9)+0.1
zam=rnd(9.5)+0.5
xtim=rnd(0.4)+0.01
ytim=rnd(0.4)+0.01
ztim=rnd(0.4)+0.01
xtype=flr(rnd(5))
ytype=flr(rnd(5))
ztype=flr(rnd(5))
timer=0
poke(0x5f2d, 1)
click=false
lastclick=false
showwallet=true
end
function _update60()
click=stat(34)
timer+=1
if timer >= 240 then
srand(18)
timer = 0
end
if lastclick==0 then
if click==2 then
extcmd("video")
elseif click == 1 then
showwallet = not showwallet
end
end
lastclick=click
end
function _draw()
for i=1,50 do
line(63,63,rnd(148)-10,rnd(148)-10,rnd({0,1,5}))
end
for p in all(points) do
circfill(fx(p.x,p.y),fy(p.x,p.y)+fz(p.x,p.y),3,p.col)
end
end
function fx(i,j)
local _x = i+sin(xoff+(timer/240)+(xtim*roll(i,j,xtype)))*xam
return _x
end
function fy(i,j)
local _y = j+sin(yoff+(timer/240)+(ytim*roll(i,j,ytype)))*yam
return _y
end
function fz(i,j)
local _z = sin(zoff+(timer/240)+(ztim*roll(i,j,ztype)))*zam
return _z
end
function roll(i,j,typ)
if typ==0 then
return i+j
elseif typ==1 then
return i-j
elseif typ==2 then
return j-i
elseif typ==3 then
return i
else
return j
end
end