From e442a087f89659b1e1c43952e38e94e46538f185 Mon Sep 17 00:00:00 2001 From: hkc Date: Sun, 15 Oct 2023 03:24:29 +0300 Subject: [PATCH] Scale exists apparently --- ccpi.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ccpi.lua b/ccpi.lua index a756e55..1de5e85 100644 --- a/ccpi.lua +++ b/ccpi.lua @@ -30,6 +30,7 @@ local function load(path) end image.w, image.h = string.byte(fp:read(1)), string.byte(fp:read(1)) + image.scale = 0.5 + string.byte(fp:read(1)) * 5 / 255 for i = 1, 16 do image.palette[i] = bit32.lshift(string.byte(fp:read(1)), 16) image.palette[i] = bit32.bor(image.palette[i], bit32.lshift(string.byte(fp:read(1)), 8)) @@ -61,6 +62,8 @@ local function draw(img, ox, oy, monitor) t.setPaletteColor(colors_list[i], img.palette[i]) end + t.setTextScale(image.scale) + for y = 1, img.h do t.setCursorPos(ox, oy + y - 1) t.blit(img.lines[y].s, img.lines[y].fg, img.lines[y].bg)