mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2024-11-14 13:40:04 +00:00
35 lines
766 B
Lua
35 lines
766 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
|
|
|
|
function glerminal.keypresse(key) end
|
|
function glerminal.keyrelease(key) end
|
|
function glerminal.mousemove(x, y) end
|
|
function glerminal.mousepress(button, x, y) end
|
|
function glerminal.mouserelease(button, x, y) end |