summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-05 01:42:51 +0100
committerubq323 <ubq323@ubq323.website>2022-08-05 01:42:51 +0100
commita13943635dbe6fa69999f6c9eee01ce3a4c0fbb1 (patch)
tree0583bcbc315bba74f329e05fdeefb606710a04f8 /img
parent4b38497c78cb3da55a8d856c61e7cdd68f33b2e3 (diff)
finger
Diffstat (limited to 'img')
-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}