mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2024-11-13 21:40:04 +00:00
29 lines
551 B
Lua
29 lines
551 B
Lua
|
local time = 0
|
||
|
|
||
|
function glerminal.init()
|
||
|
if not glerminal.sprites('sprites.png') then
|
||
|
print('failed to load sprites')
|
||
|
end
|
||
|
|
||
|
for i = 1, 40 do
|
||
|
for j = 1, 25 do
|
||
|
glerminal.set(i, j, 1, 2)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
glerminal.tint(1, 0xA0FFFFFF)
|
||
|
|
||
|
glerminal.flush()
|
||
|
end
|
||
|
|
||
|
function glerminal.main(dt)
|
||
|
time = time + dt / 2
|
||
|
|
||
|
for i = 1, 40 do
|
||
|
for j = 1, 25 do
|
||
|
glerminal.offset(i, j, 1, math.cos(time * i / math.pi), math.sin(time * j / math.pi))
|
||
|
end
|
||
|
end
|
||
|
|
||
|
glerminal.flush()
|
||
|
end
|