diff options
-rw-r--r-- | img/better_disp.lua | 30 | ||||
-rw-r--r-- | img/disp_common.lua | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/img/better_disp.lua b/img/better_disp.lua index 2257232..a8e7457 100644 --- a/img/better_disp.lua +++ b/img/better_disp.lua @@ -67,13 +67,13 @@ local function adjust_to_2_colors(R,gromlings,pdists) while ncolors > 2 do - print("- ncolors is "..ncolors) + -- print("- ncolors is "..ncolors) - io.write("all_current_colors: ") - for k in pairs(all_current_colors) do io.write(k," ") end - io.write("\ngromling_colors: ") - for k,v in pairs(gromling_colors) do print(k,v) end - print() + -- io.write("all_current_colors: ") + -- for k in pairs(all_current_colors) do io.write(k," ") end + -- io.write("\ngromling_colors: ") + -- for k,v in pairs(gromling_colors) do print(k,v) end + --print() -- merge closest two colors until there are only 2 distinct ones left local best_dist = 9999 @@ -98,7 +98,7 @@ local function adjust_to_2_colors(R,gromlings,pdists) assert(best_a,"no best_a") assert(best_b,"no best_b") assert(best_a ~= best_b,"best a and b are the same") - print("mergng "..best_b.." into "..best_a) + --print("mergng "..best_b.." into "..best_a) all_current_colors[best_b] = nil ncolors=ncolors-1 for gidx,col in ipairs(gromling_colors) do @@ -108,13 +108,13 @@ local function adjust_to_2_colors(R,gromlings,pdists) end - print("-#-- ncolors is "..ncolors) + --print("-#-- ncolors is "..ncolors) - io.write("all_current_colors: ") - for k in pairs(all_current_colors) do io.write(k," ") end - io.write("\ngromling_colors: ") - for k,v in pairs(gromling_colors) do print(k,v) end - print() + --io.write("all_current_colors: ") + --for k in pairs(all_current_colors) do io.write(k," ") end + --io.write("\ngromling_colors: ") + --for k,v in pairs(gromling_colors) do print(k,v) end + --print() return gromling_colors end @@ -175,9 +175,9 @@ local function disp(R,img,scrx,scry,w,h,imgx,imgy) end local lCx_gromlings = adjust_to_2_colors(R,lPx_gromlings,pdists) - for k,v in ipairs(lCx_gromlings) do print("thethe",k,v) end + -- for k,v in ipairs(lCx_gromlings) do print("thethe",k,v) end local vlorbdf = {gromling_list_to_vlorb(lCx_gromlings)} - for k,v in ipairs(vlorbdf) do print("ehteht",k,v) end + -- for k,v in ipairs(vlorbdf) do print("ehteht",k,v) end local textc,bgc,vlorbchar = vlorb(table.unpack(vlorbdf)) R.setTextColor(textc) R.setBackgroundColor(bgc) diff --git a/img/disp_common.lua b/img/disp_common.lua index 5648d87..57d2944 100644 --- a/img/disp_common.lua +++ b/img/disp_common.lua @@ -106,7 +106,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)) + --print(table.unpack(pc)) R.setPaletteColor(2^i,table.unpack(pc)) end end |