VERSIÓ 1.4
- [NEW] jfile_listdir() - [NEW] ara els moduls es deuen carregar amb 'require "directori.modul" ' - [NEW] Ara es poden carregar directoris sencers amb 'require "directori.*" '
This commit is contained in:
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,6 +1,9 @@
|
||||
return {
|
||||
require "ia.test"
|
||||
|
||||
other = {
|
||||
peiv = function()
|
||||
pal.color(1, 1, 1, 1)
|
||||
test2()
|
||||
return "HOLA OTHER UNIT"
|
||||
end
|
||||
}
|
||||
3
data/ia/test.lua
Normal file
3
data/ia/test.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
function test2()
|
||||
draw.text("THIS WORKS!",1,140,4)
|
||||
end
|
||||
@@ -1,14 +1,21 @@
|
||||
other = require "other"
|
||||
require "ia.other"
|
||||
|
||||
x=0
|
||||
|
||||
function mini.init()
|
||||
s = surf.load("logo.gif")
|
||||
s = surf.load("gfx/logo.gif")
|
||||
surf.source(s)
|
||||
p = pal.load("logo.gif")
|
||||
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("========================")
|
||||
|
||||
end
|
||||
|
||||
function mini.update()
|
||||
@@ -34,4 +41,5 @@ function mini.update()
|
||||
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)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user