VERSIÓ 1.3

- [NEW] shader.init(), shader.enable i shader.disable
- [NEW] Deixe els shaders de Lynx i GBC de exemple.
- [NEW] file_getfilebuffer() ara soporta un tercer paràmetre opcional, per a 'zeroterminar' el buffer per si es un arxiu de text.
This commit is contained in:
JailDoctor committed 2025-06-18 19:29:17 +02:00
1 parent 79781bbed1
commit e1d5eb051c
14 files changed
+213 -67

No files matched your search

+20 -6
View File
@@ -3,16 +3,30 @@ other = require "other"
x=0
function mini.init()
s = surf.load("tiles01.gif")
s = surf.load("logo.gif")
surf.source(s)
p = pal.load("tiles01.gif")
p = pal.load("logo.gif")
pal.set(p)
pal.trans(255)
end
function mini.update()
surf.cls(1)
draw.surf(0, 0, 64, 64, 10, 10)
if key.down(key.ESCAPE) then sys.quit() end
draw.text(sys.fps(), 0, 0, 4)
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
end