Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = 0
- sline = function(x1,y1,x2,y2,tex)
- local sx = abs(flr(x2)-flr(x1))
- local sy = abs(flr(y2)-flr(y1))
- local steps = max(sx,sy)
- steps = 32
- local tx = (#tex+1)/steps
- local dx = (x2-x1)/steps
- local dy = (y2-y1)/steps
- local ti = 0
- for i=0,steps do
- pset(x1,y1,tex[flr(ti)])
- x1 += dx + sin((t*4)+y1/64)
- y1 += dy + cos((t*4)+x1/32)
- ti += tx
- end
- end
- function _update60()
- t += 0x0.0080
- end
- function _draw()
- cls(0)
- local tex = {
- [0]=1,2,14,15,7
- }
- for a = t,t+1,0x0.0c do
- local x0 = 64 + cos(t)*8
- local y0 = 64 + sin(t)*8
- local x1 = 96
- local y1 = 64
- local px0 = x0 + cos(a)*64
- local py0 = y0 + sin(a)*64
- local px1 = x1 + cos(a)*32
- local py1 = y1 + sin(a)*32
- sline(x0,y0,px0,py0,tex)
- --line(x1,y1,px1,py1,7)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement