glerminal/lua-examples/basic/main.lua

35 lines
766 B
Lua
Raw Permalink Normal View History

2024-05-29 22:53:47 +00:00
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()
2024-06-11 04:40:43 +00:00
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