summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-07 01:21:14 +0100
committerubq323 <ubq323@ubq323.website>2022-08-07 01:21:14 +0100
commit9fac7f49c88e5accde5d32432c4d4c20bdfd4063 (patch)
tree7b530e11ddf719ad94acdefde77b4362b3045ec6 /img
parent8a9c0d4808b525468078170845d20c9bf1fd9104 (diff)
img
Diffstat (limited to 'img')
-rw-r--r--img/driver.lua44
1 files changed, 22 insertions, 22 deletions
diff --git a/img/driver.lua b/img/driver.lua
index 76f5a33..fce4bae 100644
--- a/img/driver.lua
+++ b/img/driver.lua
@@ -1,27 +1,27 @@
package.path = "/?;/?.lua;"..package.path
-_G.ERRLOG = {}
-if not _G.oldprint then
- _G.oldprint = print
- _G.print = function(...)
- o = {}
- for ix = 1,select('#',...) do
- o[ix] = tostring(select(ix,...))
- end
- table.insert(_G.ERRLOG,table.concat(o,"\t"))
- --_G.oldprint(...)
- end
- _G.rpr = function() _G.print = _G.oldprint _G.oldprint = nil end
-end
+-- _G.ERRLOG = {}
+-- if not _G.oldprint then
+-- _G.oldprint = print
+-- _G.print = function(...)
+-- o = {}
+-- for ix = 1,select('#',...) do
+-- o[ix] = tostring(select(ix,...))
+-- end
+-- table.insert(_G.ERRLOG,table.concat(o,"\t"))
+-- --_G.oldprint(...)
+-- end
+-- _G.rpr = function() _G.print = _G.oldprint _G.oldprint = nil end
+-- end
-print("uu")
+--print("uu")
local load_pnm = require("load_pnm").load
-print("uu")
+--print("uu")
local better_disp = require("better_disp")
-print("uu")
+--print("uu")
local disp_common = require("disp_common")
local perr = require("util").perr
-print("uu")
+--print("uu")
local function msgh(e)
local tb = debug.traceback()
@@ -33,11 +33,11 @@ local file,err = io.open(arg[1],"rb")
perr(err,"io.open")
local ff = file:read("a")
local img = load_pnm(ff)
-local W = window.create(term.current(),20,10,20,20)
-W.clear()
-print("the")
-print(xpcall(function() better_disp.disp(W,img,1,1) end,msgh))
-print("endthe")
+--local W = window.create(term.current(),20,10,20,20)
+term.clear()
+--print("the")
+xpcall(function() better_disp.disp(term.current(),img,1,1) end,msgh)
+--print("endthe")
os.pullEvent("key")
disp_common.reset_palette(term.current())
rpr()