38 lines
761 B
Lua
38 lines
761 B
Lua
other = require "other"
|
|
|
|
x=0
|
|
|
|
function mini.init()
|
|
s = surf.load("logo.gif")
|
|
surf.source(s)
|
|
p = pal.load("logo.gif")
|
|
pal.set(p)
|
|
pal.trans(255)
|
|
surf.save(s, "prova.gif")
|
|
end
|
|
|
|
function mini.update()
|
|
surf.cls(0)
|
|
draw.surf(0, 0, 160, 144, 0, 0)
|
|
|
|
draw.text("PRESS START", 60, 110, 28)
|
|
if key.press(key.ESCAPE) then sys.quit() end
|
|
draw.text(sys.fps(), 1, 1, 28)
|
|
|
|
if key.press(key.N1) then
|
|
shader.init("lynx.glsl")
|
|
shader.enable()
|
|
end
|
|
if key.press(key.N2) then
|
|
shader.init("gbc.glsl")
|
|
shader.enable()
|
|
end
|
|
if key.press(key.N3) then
|
|
shader.disable()
|
|
end
|
|
|
|
local mx, my = mouse.pos()
|
|
draw.rectf(mx, my, 4, 4, 8)
|
|
draw.text(mx .. " " .. my, 1, 8, 8)
|
|
end
|