diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-06 23:30:40 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-06 23:30:40 +0100 |
commit | 605635b98ef5bd84c36edfa46c20f6b5988ff0cc (patch) | |
tree | c7f4e58259d281409793253bbeb2399d17d0ec2a | |
parent | c430268f2519d4f7b4a0bcda41a32edce2037351 (diff) |
img
-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 |