Yay, it works!
Im pretty much using this code:
local env = setmetatable({
term = setmetatable({
setCursorPos = function (x, y)
_G.term.setCursorPos(x + 1, y + 1)
end
}, {__index = _G.term}),
}, {__index = _G})
function func()
os.run(env, "ptest")
end
setfenv(func, env)
func()
ptest just has a simple term.setCursorPos(2,2) and write("hi") in it.
Now, to implement all the other drawing functions (paintutils.drawLine, drawPixel image, etc)
Oh, and while im doing that, what about multitasking?
No-one talked about that, really in here yet
Edited by MadBudderKing, 04 May 2014 - 05:18 PM.