Initial lua API

This commit is contained in:
Shylie
2024-05-29 18:53:47 -04:00
parent 844e1b6c7a
commit 939fea0fa7
9 changed files with 264 additions and 34 deletions

View File

@@ -0,0 +1,29 @@
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

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6dee3efcdfa72e54a602f69643907bb8e8a3328d2b40c2116dce22ff179d8892
size 182