diff options
-rw-r--r-- | framebuf.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/framebuf.lua b/framebuf.lua index bf0dac4..4f7ca3b 100644 --- a/framebuf.lua +++ b/framebuf.lua @@ -177,6 +177,7 @@ function M:present(offsx, offsy) local pw, ph = M.resolution() local cols = {} local chars = {} + print("","1") for y = offsy + 1, offsy + ph, 3 do for x = offsx + 1, offsx + pw, 2 do local char, fg, bg = get_char(self, x, y) @@ -187,10 +188,12 @@ function M:present(offsx, offsy) end end end + print("","2") local palette, map = median_cut(cols, 16) for i, color in ipairs(palette) do term.setPaletteColor(2^(i - 1), color) end + print("","3") for i = 1, w * h, w do term.setCursorPos(1, (i - 1) / w) local blit_char, blit_fg, blit_bg = {}, {}, {} |