summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--img/driver.lua2
-rw-r--r--img/shitty_disp.lua4
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}