From a13943635dbe6fa69999f6c9eee01ce3a4c0fbb1 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 5 Aug 2022 01:42:51 +0100 Subject: finger --- img/driver.lua | 2 +- img/shitty_disp.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/img/driver.lua b/img/driver.lua index 2a7c4ca..20a3ff2 100644 --- a/img/driver.lua +++ b/img/driver.lua @@ -9,4 +9,4 @@ perr(err,"io.open") local ff = file:read("a") local img = load_pnm(ff) print(img) -shitty_disp(term.current(),img,1,1,20,20,1,1) +shitty_disp(term.current(),img,1,1,60,20,478,290) diff --git a/img/shitty_disp.lua b/img/shitty_disp.lua index c2077db..f5ebfb9 100644 --- a/img/shitty_disp.lua +++ b/img/shitty_disp.lua @@ -6,7 +6,7 @@ local function color_dist(c1,c2) return total end -local function closest_palette_color(R,c) +function closest_palette_color(R,c) local closest = nil local closest_dist = 99999999 for i=0,15 do @@ -40,4 +40,4 @@ local function disp(R,img,scrx,scry,w,h,imgx,imgy) end end -return {disp=disp} +return {disp=disp,color_dist=color_dist,closest_palette_color=closest_palette_color} -- cgit v1.2.3