summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-05 01:13:40 +0100
committerubq323 <ubq323@ubq323.website>2022-08-05 01:13:40 +0100
commit9b1ec52cbb1531b49036006453bbeb106852adb1 (patch)
tree9d81c0ac0172596c8b17bccea439c56de8003116
parenta8565927929c78ffb10b27fee3bd5f913f5b3a14 (diff)
displayment
-rw-r--r--img/driver.dat1
-rw-r--r--img/driver.lua9
-rw-r--r--img/shitty_disp.lua2
3 files changed, 12 insertions, 0 deletions
diff --git a/img/driver.dat b/img/driver.dat
new file mode 100644
index 0000000..228280a
--- /dev/null
+++ b/img/driver.dat
@@ -0,0 +1 @@
+dep util img/shitty_disp img/load_pnm
diff --git a/img/driver.lua b/img/driver.lua
new file mode 100644
index 0000000..808399d
--- /dev/null
+++ b/img/driver.lua
@@ -0,0 +1,9 @@
+local load_pnm = require("img.load_pnm").load
+local shitty_disp = require("img.shitty_disp").disp
+local perr = require("util").perr
+
+local file,err = fs.open("/J.pbm","r")
+perr(err,"fs.open")
+local ff = file.readAll()
+local img = load_pnm(ff)
+shitty_disp(img)
diff --git a/img/shitty_disp.lua b/img/shitty_disp.lua
index f0a1f07..c2077db 100644
--- a/img/shitty_disp.lua
+++ b/img/shitty_disp.lua
@@ -39,3 +39,5 @@ local function disp(R,img,scrx,scry,w,h,imgx,imgy)
end
end
end
+
+return {disp=disp}