diff options
-rw-r--r-- | img/disp_common.lua | 1 | ||||
-rw-r--r-- | img/driver.lua | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/img/disp_common.lua b/img/disp_common.lua index 5c46b94..cf67d3a 100644 --- a/img/disp_common.lua +++ b/img/disp_common.lua @@ -105,6 +105,7 @@ local function improve_palette(R,img,w,h,imgx,imgy) assert(#palette==16,#palette.." doesn't equal 16") for i=0,15 do local pc = palette[i+1] + print(table.unpack(pc)) R.setPaletteColor(2^i,table.unpack(pc)) end end diff --git a/img/driver.lua b/img/driver.lua index dd6f6f1..d623044 100644 --- a/img/driver.lua +++ b/img/driver.lua @@ -1,5 +1,14 @@ package.path = "/?;/?.lua;"..package.path +_G.ERRLOG = {} +_G.print = function(...) + o = {} + for ix = 1,select('#',...) do + o[ix] = tostring(select(ix,...)) + end + table.insert(_G.ERRLOG,table.concat(o,"\n")) +end + local load_pnm = require("load_pnm").load local better_disp = require("better_disp") local perr = require("util").perr |