-[NEW] font.load() -[NEW] font.current() -[NEW] font.spacing() -[NEW] font.DEFAULT -[NEW] surf.SCREEN
52 lines
1.1 KiB
Lua
52 lines
1.1 KiB
Lua
--require "ia.other"
|
|
|
|
x=0
|
|
|
|
function mini.init()
|
|
s = surf.load("gfx/logo.gif")
|
|
surf.source(s)
|
|
p = pal.load("gfx/logo.gif")
|
|
pal.set(p)
|
|
pal.trans(255)
|
|
--surf.save(s, "prova.gif", p)
|
|
|
|
print("=== PACKAGES LOADED ===")
|
|
for name, value in pairs(package.loaded) do
|
|
print(name, value)
|
|
end
|
|
print("========================")
|
|
|
|
f = font.load("font.fnt")
|
|
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)
|
|
--draw.text(other.peiv(),1,100,4)
|
|
|
|
font.current(f)
|
|
font.spacing(0)
|
|
draw.text("0146",100,50,28)
|
|
font.current(font.DEFAULT)
|
|
end
|