Skip to content

Commit a0db5ec

Browse files
authored
Fixed nfp
Forgot i didn't add nfp support >.<
1 parent 3ef7aa9 commit a0db5ec

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Basalt/libraries/images.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
local sub,floor = string.sub,math.floor
1+
local sub,floor,rep = string.sub,math.floor,string.rep
22

33
local function loadNFPAsBimg(path)
4-
return {[1]={{}, {}, paintutils.loadImage(path)}}, "bimg"
4+
local bimg = {{}}
5+
local nfp = fs.open("test.nfp", "r")
6+
for line in nfp.readLine do
7+
table.insert(bimg[1], {rep(" ",#line), rep(" ",#line), line})
8+
end
9+
nfp.close()
10+
return bimg
511
end
612

713
local function loadNFP(path)
@@ -86,4 +92,4 @@ return {
8692
resizeBIMG = resizeBIMG,
8793
loadImageAsBimg = loadImageAsBimg,
8894

89-
}
95+
}

0 commit comments

Comments
 (0)