From 9b1ec52cbb1531b49036006453bbeb106852adb1 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 5 Aug 2022 01:13:40 +0100 Subject: displayment --- img/driver.dat | 1 + img/driver.lua | 9 +++++++++ img/shitty_disp.lua | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 img/driver.dat create mode 100644 img/driver.lua 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} -- cgit v1.2.3